|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkrati.store.AbstractDataArray
krati.store.DynamicDataArray
public final class DynamicDataArray
DynamicDataArray - a convenient class for creating a dynamic data array.
Field Summary |
---|
Fields inherited from class krati.store.AbstractDataArray |
---|
_addrArray, _dataArray, _homeDir, _homePath |
Constructor Summary | |
---|---|
DynamicDataArray(int initialLength,
File homeDirectory,
SegmentFactory segmentFactory)
Constructs a dynamic data array with the following default params. |
|
DynamicDataArray(int initialLength,
File homeDirectory,
SegmentFactory segmentFactory,
int segmentFileSizeMB)
Constructs a dynamic data array with the following default params. |
|
DynamicDataArray(int initialLength,
int batchSize,
int numSyncBatches,
File homeDirectory,
SegmentFactory segmentFactory,
int segmentFileSizeMB,
double segmentCompactFactor)
Constructs a dynamic data array. |
Method Summary | |
---|---|
protected AddressArray |
createAddressArray(int length,
int batchSize,
int numSyncBatches,
File homeDirectory)
|
void |
expandCapacity(int index)
Expands the capacity of array to accommodate a given index. |
void |
set(int index,
byte[] data,
int offset,
int length,
long scn)
Sets data at a specified index. |
void |
set(int index,
byte[] data,
long scn)
Sets data at a specified index. |
Methods inherited from class krati.store.AbstractDataArray |
---|
clear, get, get, get, getHomeDir, getHomePath, getHWMark, getLength, getLWMark, getStatus, hasData, hasIndex, length, persist, saveHWMark, sync, transferTo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface krati.array.Array |
---|
clear, hasIndex, length |
Constructor Detail |
---|
public DynamicDataArray(int initialLength, File homeDirectory, SegmentFactory segmentFactory) throws Exception
batchSize : 10000 numSyncBatches : 5 segmentCompactFactor : 0.5 segmentFileSizeMB : 256
initialLength
- - the initial array lengthhomeDirectory
- - the home directory of data arraysegmentFactory
- - the segment factory
Exception
public DynamicDataArray(int initialLength, File homeDirectory, SegmentFactory segmentFactory, int segmentFileSizeMB) throws Exception
batchSize : 10000 numSyncBatches : 5 segmentCompactFactor : 0.5
initialLength
- - the initial array lengthhomeDirectory
- - the home directory of data arraysegmentFactory
- - the segment factorysegmentFileSizeMB
- - the segment size in MB
Exception
public DynamicDataArray(int initialLength, int batchSize, int numSyncBatches, File homeDirectory, SegmentFactory segmentFactory, int segmentFileSizeMB, double segmentCompactFactor) throws Exception
initialLength
- - the initial array lengthbatchSize
- - the number of updates per update batch, i.e. the redo entry sizenumSyncBatches
- - the number of update batches required for updating the underlying address arrayhomeDirectory
- - the home directory of data arraysegmentFactory
- - the segment factorysegmentFileSizeMB
- - the segment size in MBsegmentCompactFactor
- - the segment load threshold, below which a segment is eligible for compaction
Exception
Method Detail |
---|
protected AddressArray createAddressArray(int length, int batchSize, int numSyncBatches, File homeDirectory) throws Exception
createAddressArray
in class AbstractDataArray
Exception
public void expandCapacity(int index) throws Exception
DynamicArray
expandCapacity
in interface DynamicArray
index
- an index in the array
Exception
public void set(int index, byte[] data, long scn) throws Exception
DataArray
set
in interface DataArray
set
in class AbstractDataArray
index
- data index in DataArraydata
- data to write to DataArray
Exception
public void set(int index, byte[] data, int offset, int length, long scn) throws Exception
DataArray
set
in interface DataArray
set
in class AbstractDataArray
index
- data index in DataArraydata
- data to write to DataArrayoffset
- the offset of the data array to start readlength
- the length of data to read from the data array
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |