krati.core.array.entry
Interface Entry<T extends EntryValue>

All Superinterfaces:
Comparable<Entry<T>>
All Known Implementing Classes:
AbstractEntry, PreFillEntry, PreFillEntryInt, PreFillEntryLong, PreFillEntryShort, SimpleEntry

public interface Entry<T extends EntryValue>
extends Comparable<Entry<T>>

Redo Entry.

Author:
jwu

Field Summary
static long STORAGE_VERSION
           
 
Method Summary
 void add(T value)
          Adds an EntryValue.
 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()
           
 long getMinScn()
           
 int getServiceId()
          Gets the service Id of this Entry.
 EntryValueFactory<T> getValueFactory()
           
 List<T> getValueList()
           
 boolean isEmpty()
           
 boolean isFull()
           
 void load(File file)
          Loads an entry from a given file.
 void save(File file)
          Saves this Entry to a file.
 void setServiceId(int serviceId)
          Sets the service Id of this Entry.
 int size()
           
 

Field Detail

STORAGE_VERSION

static final long STORAGE_VERSION
See Also:
Constant Field Values
Method Detail

getId

int getId()
Returns:
the Id of this Entry.

getMinScn

long getMinScn()
Returns:
the minimum SCN of updates maintained by this Entry.

getMaxScn

long getMaxScn()
Returns:
the maximum SCN of updates maintained by this Entry.

getFile

File getFile()
Gets the Entry file.

Returns:
this Entry's file.

capacity

int capacity()
Returns:
the capacity of this Entry.

size

int size()
Returns:
the number of EntryValue(s) in this Entry.

isFull

boolean isFull()
Returns:
true if this Entry if filled up. Otherwise, false

isEmpty

boolean isEmpty()
Returns:
true if this Entry if empty. Otherwise, false

compareTo

int compareTo(Entry<T> e)
Compares this Entry to another Entry for sorting purposes.

Specified by:
compareTo in interface Comparable<Entry<T extends EntryValue>>

getValueList

List<T> getValueList()
Returns:
a list of EntryValue(s) contained in this Entry.

getValueFactory

EntryValueFactory<T> getValueFactory()
Returns:
the EntryValue factory.

save

void save(File file)
          throws IOException
Saves this Entry to a file.

Parameters:
file -
Throws:
IOException

load

void load(File file)
          throws IOException
Loads an entry from a given file.

Parameters:
file -
Throws:
IOException

add

void add(T value)
Adds an EntryValue.


clear

void clear()
Clears this Entry.


getServiceId

int getServiceId()
Gets the service Id of this Entry.

Returns:
the service Id of this Entry.

setServiceId

void setServiceId(int serviceId)
Sets the service Id of this Entry.

Parameters:
serviceId -


Copyright © 2011. All Rights Reserved.