AMPS C# Client  5.3.3.4
AMPS C# Client for .NET
AMPS.Client.MemoryStoreBuffer Class Reference

MemoryStoreBuffer is a wrapper for a list that maintains positon. In order to do this, MemoryStoreBuffer uses a ByteBuffer. More...

+ Inheritance diagram for AMPS.Client.MemoryStoreBuffer:

Public Member Functions

 MemoryStoreBuffer (int initialSize)
 
long getSize ()
 Gets the size of the buffer. More...
 
void setSize (long newSize_)
 Sets the size of the buffer. More...
 
long getPosition ()
 Gets the current position of the buffer. More...
 
void setPosition (long position_)
 Sets the new current position in the buffer. More...
 
void putByte (byte b)
 Writes the byte in the buffer. More...
 
byte getByte ()
 Gets the byte from the buffer. More...
 
void putInt (int i)
 Writes the integer to the buffer. More...
 
void putInt (long position, int intValue)
 Writes the integer to the buffer. More...
 
int getInt ()
 Gets the integer from the buffer. More...
 
int getInt (long position)
 Gets the integer from the buffer. More...
 
void putLong (long l)
 Writes thee long to the buffer. More...
 
void putLong (long position, long longValue)
 Writes the long to the buffer. More...
 
long getLong ()
 Gets the long from the buffer. More...
 
void putUlong (ulong l)
 Writes an unsigned long to the buffer. More...
 
void putUlong (long position, ulong ulongValue)
 Writes an unsigned long to the buffer. More...
 
ulong getUlong ()
 Gets the unsigned long from the buffer. More...
 
void putBytes (BlockPublishStore.ByteSequence bytes)
 Writes a series of bytes at the current positon, taken from the specified BlockPublishStore.ByteSequence. More...
 
void getBytes (BlockPublishStore.ByteSequence outBytes)
 Gets the series of bytes at the current position by placing them into the provided BlockPublishStore.ByteSequence object. More...
 
void putBytes (byte[] buffer, int position, int length)
 Writes a series of bytes at the current position, taken from a byte array. More...
 
void getBytes (Fields.Field outField, int length)
 Gets the series of bytes at the current position, this is done by copying them into a Field object. More...
 
void zero (long offset, int length)
 Sets the offset and length of the buffer to 0. More...
 
- Public Member Functions inherited from AMPS.Client.BlockPublishStore.Buffer
void getBytes (Field outBytes, int length)
 

Public Attributes

long _position = 0
 

Protected Attributes

byte[] _buffer = null
 
Store _store = null
 

Detailed Description

MemoryStoreBuffer is a wrapper for a list that maintains positon. In order to do this, MemoryStoreBuffer uses a ByteBuffer.

Member Function Documentation

◆ getByte()

byte AMPS.Client.MemoryStoreBuffer.getByte ( )
inline

Gets the byte from the buffer.

Returns
The byte from the buffer.

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ getBytes() [1/2]

void AMPS.Client.MemoryStoreBuffer.getBytes ( BlockPublishStore.ByteSequence  outBytes)
inline

Gets the series of bytes at the current position by placing them into the provided BlockPublishStore.ByteSequence object.

Parameters
outBytesThe ByteSequence object to be copied.


Implements AMPS.Client.BlockPublishStore.Buffer.

◆ getBytes() [2/2]

void AMPS.Client.MemoryStoreBuffer.getBytes ( Fields.Field  outField,
int  length 
)
inline

Gets the series of bytes at the current position, this is done by copying them into a Field object.

Parameters
outFieldThe Field object used to copy the byte sequence.
lengthThe length of the Field object.

◆ getInt() [1/2]

int AMPS.Client.MemoryStoreBuffer.getInt ( )
inline

Gets the integer from the buffer.

Returns
The integer from the buffer.

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ getInt() [2/2]

int AMPS.Client.MemoryStoreBuffer.getInt ( long  position)
inline

Gets the integer from the buffer.

Parameters
positionThe position in the buffer where the integer begins.
Returns
The integer from the buffer.

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ getLong()

long AMPS.Client.MemoryStoreBuffer.getLong ( )
inline

Gets the long from the buffer.

Returns
The long from the buffer.

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ getPosition()

long AMPS.Client.MemoryStoreBuffer.getPosition ( )
inline

Gets the current position of the buffer.

Returns
The current position of the buffer.

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ getSize()

long AMPS.Client.MemoryStoreBuffer.getSize ( )
inline

Gets the size of the buffer.

Returns
The size of the buffer

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ getUlong()

ulong AMPS.Client.MemoryStoreBuffer.getUlong ( )
inline

Gets the unsigned long from the buffer.

Returns
The unsigned long from the buffer.

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ putByte()

void AMPS.Client.MemoryStoreBuffer.putByte ( byte  b)
inline

Writes the byte in the buffer.

Parameters
bThe byte to be written in the buffer

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ putBytes() [1/2]

void AMPS.Client.MemoryStoreBuffer.putBytes ( BlockPublishStore.ByteSequence  bytes)
inline

Writes a series of bytes at the current positon, taken from the specified BlockPublishStore.ByteSequence.

Parameters
bytesThe series of bytes to write at the current position.

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ putBytes() [2/2]

void AMPS.Client.MemoryStoreBuffer.putBytes ( byte[]  buffer,
int  position,
int  length 
)
inline

Writes a series of bytes at the current position, taken from a byte array.

Parameters
bufferThe buffer containing a series of bytes.
positionThe position in the buffer where the series of bytes are located.
lengthThe length of the byte buffeer.

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ putInt() [1/2]

void AMPS.Client.MemoryStoreBuffer.putInt ( int  i)
inline

Writes the integer to the buffer.

Parameters
iThe integer to be placed in the buffer.

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ putInt() [2/2]

void AMPS.Client.MemoryStoreBuffer.putInt ( long  position,
int  intValue 
)
inline

Writes the integer to the buffer.

Parameters
positionThe location where the integer is placed in the buffer.
intValueThe integer to bee placed in the buffer.

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ putLong() [1/2]

void AMPS.Client.MemoryStoreBuffer.putLong ( long  l)
inline

Writes thee long to the buffer.

Parameters
lThe long to write in the buffer.

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ putLong() [2/2]

void AMPS.Client.MemoryStoreBuffer.putLong ( long  position,
long  longValue 
)
inline

Writes the long to the buffer.

Parameters
positionThe position in the buffer where the long should be placed.
longValueThe long to write in the buffer.

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ putUlong() [1/2]

void AMPS.Client.MemoryStoreBuffer.putUlong ( long  position,
ulong  ulongValue 
)
inline

Writes an unsigned long to the buffer.

Parameters
positionThe position in the buffer where the unsigned long should be placed.
ulongValueThe unsigned long to write in the buffer.

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ putUlong() [2/2]

void AMPS.Client.MemoryStoreBuffer.putUlong ( ulong  l)
inline

Writes an unsigned long to the buffer.

Parameters
lThe unsigned long to write in the buffer.

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ setPosition()

void AMPS.Client.MemoryStoreBuffer.setPosition ( long  position_)
inline

Sets the new current position in the buffer.

Parameters
position_The new current position to be set in the buffer.

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ setSize()

void AMPS.Client.MemoryStoreBuffer.setSize ( long  newSize_)
inline

Sets the size of the buffer.

Parameters
newSize_The new size to be assigned to the buffer.

Implements AMPS.Client.BlockPublishStore.Buffer.

◆ zero()

void AMPS.Client.MemoryStoreBuffer.zero ( long  offset,
int  length 
)
inline

Sets the offset and length of the buffer to 0.

Parameters
offsetThe offset to set as 0.
lengthThe length to set as 0.

Implements AMPS.Client.BlockPublishStore.Buffer.


The documentation for this class was generated from the following file: