org.tmatesoft.sqljet.core.internal
Interface ISqlJetMemoryManager

All Known Implementing Classes:
SqlJetMemoryManager

public interface ISqlJetMemoryManager

Default implementation of SQLJet's memory manager. It allows allocate memory chunk ISqlJetMemoryBuffer.


Field Summary
static int BYTE_SIZE
           
static int INT_SIZE
           
static int LONG_SIZE
           
static int SHORT_SIZE
           
 
Method Summary
 ISqlJetMemoryBuffer allocate(int size)
          Allocates memory chunk ISqlJetMemoryBuffer using default buffer type.
 ISqlJetMemoryBuffer allocate(int size, SqlJetMemoryBufferType bufferType)
           
 ISqlJetMemoryPointer allocatePtr(int size)
          Allocates memory chunk ISqlJetMemoryBuffer using default buffer type.
 ISqlJetMemoryPointer allocatePtr(int size, SqlJetMemoryBufferType bufferType)
           
 void free(ISqlJetMemoryBuffer buffer)
          Fries memory.
 SqlJetMemoryBufferType getDefaultBufferType()
          Get buffers implementation type which is used by default.
 void setDefaultBufferType(SqlJetMemoryBufferType bufferType)
          Get buffers implementation which is used by default.
 

Field Detail

BYTE_SIZE

static final int BYTE_SIZE
See Also:
Constant Field Values

SHORT_SIZE

static final int SHORT_SIZE
See Also:
Constant Field Values

INT_SIZE

static final int INT_SIZE
See Also:
Constant Field Values

LONG_SIZE

static final int LONG_SIZE
See Also:
Constant Field Values
Method Detail

getDefaultBufferType

SqlJetMemoryBufferType getDefaultBufferType()
Get buffers implementation type which is used by default.

Returns:

setDefaultBufferType

void setDefaultBufferType(SqlJetMemoryBufferType bufferType)
Get buffers implementation which is used by default.

Parameters:
bufferType -

allocate

ISqlJetMemoryBuffer allocate(int size)
Allocates memory chunk ISqlJetMemoryBuffer using default buffer type.

Parameters:
size - size of buffer in bytes
Returns:
allocated buffer

allocate

ISqlJetMemoryBuffer allocate(int size,
                             SqlJetMemoryBufferType bufferType)
Parameters:
size -
bufferType -
Returns:

allocatePtr

ISqlJetMemoryPointer allocatePtr(int size)
Allocates memory chunk ISqlJetMemoryBuffer using default buffer type.

Parameters:
size - size of buffer in bytes
Returns:
allocated buffer

allocatePtr

ISqlJetMemoryPointer allocatePtr(int size,
                                 SqlJetMemoryBufferType bufferType)
Parameters:
size -
bufferType -
Returns:

free

void free(ISqlJetMemoryBuffer buffer)
Fries memory.

Parameters:
buffer - buff