|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkrati.core.array.basic.DynamicIntArray
public class DynamicIntArray
DynamicIntArray
Field Summary | |
---|---|
protected ArrayFile |
_arrayFile
|
protected File |
_directory
|
protected EntryFactory<V> |
_entryFactory
|
protected ArrayEntryManager<V> |
_entryManager
|
protected int |
_length
|
Constructor Summary | |
---|---|
DynamicIntArray(int entrySize,
int maxEntries,
File directory)
|
Method Summary | |
---|---|
void |
arrayExpanded(DynamicArray dynArray)
|
void |
clear()
Clears this Array. |
void |
expandCapacity(int index)
Expands the capacity of array to accommodate a given index. |
int |
get(int index)
Gets data at a specified index. |
File |
getDirectory()
|
EntryFactory<V> |
getEntryFactory()
|
ArrayEntryManager<V> |
getEntryManager()
|
long |
getHWMark()
Gets the high water mark. |
int[] |
getInternalArray()
Gets the internal primitive array. |
long |
getLWMark()
Gets the low water mark. |
boolean |
hasIndex(int index)
|
protected void |
init()
Loads data from the array file. |
protected void |
initArrayFile()
|
int |
length()
|
protected void |
loadArrayFileData()
|
protected ArrayFile |
openArrayFile(File file,
int initialLength,
int elementSize)
|
void |
persist()
Persists this array. |
void |
saveHWMark(long endOfPeriod)
Sync-up the high water mark to a given value. |
void |
set(int index,
int value,
long scn)
Sets data at a specified index. |
int |
subArrayLength()
|
void |
sync()
Sync array file with all entry logs. |
void |
updateArrayFile(List<Entry<V>> entryList)
|
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 |
---|
hasIndex, length |
Field Detail |
---|
protected int _length
protected File _directory
protected ArrayFile _arrayFile
protected EntryFactory<V extends EntryValue> _entryFactory
protected ArrayEntryManager<V extends EntryValue> _entryManager
Constructor Detail |
---|
public DynamicIntArray(int entrySize, int maxEntries, File directory) throws Exception
Exception
Method Detail |
---|
protected void loadArrayFileData()
public void saveHWMark(long endOfPeriod)
saveHWMark
in interface Persistable
endOfPeriod
- public void clear()
Array
clear
in interface Array
public int get(int index)
IntArray
get
in interface IntArray
public void set(int index, int value, long scn) throws Exception
IntArray
set
in interface IntArray
Exception
public int[] getInternalArray()
IntArray
getInternalArray
in interface IntArray
public void expandCapacity(int index) throws Exception
DynamicArray
expandCapacity
in interface DynamicArray
index
- an index in the array
Exception
public void arrayExpanded(DynamicArray dynArray)
arrayExpanded
in interface ArrayExpandListener
public final int subArrayLength()
protected void init() throws IOException
IOException
protected final ArrayFile openArrayFile(File file, int initialLength, int elementSize) throws IOException
IOException
protected void initArrayFile()
public File getDirectory()
getDirectory
in interface RecoverableArray<V extends EntryValue>
public EntryFactory<V> getEntryFactory()
getEntryFactory
in interface RecoverableArray<V extends EntryValue>
public ArrayEntryManager<V> getEntryManager()
public boolean hasIndex(int index)
hasIndex
in interface Array
public int length()
length
in interface Array
public void sync() throws IOException
sync
in interface Persistable
IOException
public void persist() throws IOException
persist
in interface Persistable
IOException
public long getHWMark()
Persistable
getHWMark
in interface Persistable
public long getLWMark()
Persistable
getLWMark
in interface Persistable
public void updateArrayFile(List<Entry<V>> entryList) throws IOException
updateArrayFile
in interface RecoverableArray<V extends EntryValue>
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |