|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkrati.core.array.entry.AbstractEntry<T>
public abstract class AbstractEntry<T extends EntryValue>
Entry. Transactional Redo Entry.
Field Summary | |
---|---|
protected int |
_entryCapacity
|
protected int |
_entryId
|
protected long |
_maxScn
|
protected long |
_minScn
|
protected EntryValueFactory<T> |
_valFactory
|
Fields inherited from interface krati.core.array.entry.Entry |
---|
STORAGE_VERSION |
Constructor Summary | |
---|---|
protected |
AbstractEntry(int entryId,
EntryValueFactory<T> valFactory,
int initialCapacity)
Create a new entry to hold updates to an array. |
Method Summary | |
---|---|
int |
capacity()
|
void |
clear()
Clears this Entry. |
int |
compareTo(Entry<T> e)
Compares this Entry to another Entry for sorting purposes. |
File |
getFile()
Gets the Entry file. |
int |
getId()
|
long |
getMaxScn()
Get the maximum SCN of updates maintained by this Entry. |
long |
getMinScn()
Get the minimum SCN of updates maintained by this Entry. |
int |
getServiceId()
Gets the service Id of this Entry. |
EntryValueFactory<T> |
getValueFactory()
|
boolean |
isEmpty()
|
boolean |
isFull()
|
void |
load(File file)
Loads an entry from a given file. |
protected abstract void |
loadDataSection(DataReader in,
int cnt)
|
protected void |
maintainScn(long scn)
|
void |
save(File file)
Saves to a file. |
protected abstract void |
saveDataSection(DataWriter out)
|
void |
setServiceId(int serviceId)
Sets the service Id of this Entry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface krati.core.array.entry.Entry |
---|
add, getValueList, size |
Field Detail |
---|
protected long _minScn
protected long _maxScn
protected final int _entryId
protected final EntryValueFactory<T extends EntryValue> _valFactory
protected int _entryCapacity
Constructor Detail |
---|
protected AbstractEntry(int entryId, EntryValueFactory<T> valFactory, int initialCapacity)
entryId
- The Id of this Entry.valFactory
- The factory for manufacturing EntryValue(s).initialCapacity
- The initial number of values this entry can hold.Method Detail |
---|
public final int getId()
getId
in interface Entry<T extends EntryValue>
public final int getServiceId()
Entry
getServiceId
in interface Entry<T extends EntryValue>
public final void setServiceId(int serviceId)
Entry
setServiceId
in interface Entry<T extends EntryValue>
public File getFile()
getFile
in interface Entry<T extends EntryValue>
public final long getMinScn()
getMinScn
in interface Entry<T extends EntryValue>
public final long getMaxScn()
getMaxScn
in interface Entry<T extends EntryValue>
public final EntryValueFactory<T> getValueFactory()
getValueFactory
in interface Entry<T extends EntryValue>
public final int capacity()
capacity
in interface Entry<T extends EntryValue>
public final boolean isFull()
isFull
in interface Entry<T extends EntryValue>
true
if this Entry if filled up. Otherwise, false
public final boolean isEmpty()
isEmpty
in interface Entry<T extends EntryValue>
true
if this Entry if empty. Otherwise, false
public void clear()
Entry
clear
in interface Entry<T extends EntryValue>
public int compareTo(Entry<T> e)
Entry
compareTo
in interface Comparable<Entry<T extends EntryValue>>
compareTo
in interface Entry<T extends EntryValue>
public final void save(File file) throws IOException
save
in interface Entry<T extends EntryValue>
file
-
IOException
public void load(File file) throws IOException
load
in interface Entry<T extends EntryValue>
file
-
IOException
protected abstract void saveDataSection(DataWriter out) throws IOException
IOException
protected abstract void loadDataSection(DataReader in, int cnt) throws IOException
IOException
protected final void maintainScn(long scn)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |