public interface IRedoLogFile<T extends IReplicationOrderedPacket> extends Iterable<T>, ReadOnlyIterable<T>, IRedoLogFileStatistics
MemoryRedoLogFile Implementor should support concurrent
 readers or a single writer, in other words, the implementor can assume access to this structure
 are guarded with a reader writer lock according to the operation type
 An exception is getApproximateSize() method which should not assume a reader lock is
 held.| Modifier and Type | Method and Description | 
|---|---|
void | 
add(T replicationPacket)
Add a replication packet to the file as the latest packet 
 | 
void | 
close()
Closes the redo log file 
 | 
void | 
deleteOldestPackets(long packetsCount)
Deletes the oldest packets, starting from the oldest up until the specified batch size 
 | 
long | 
getApproximateSize()
Gets an approximation of the number of replication packets held in the file, implementation
 of this method should not assume a reader lock is held and hence can return a result which is
 not accurate if it cannot do so without a lock. 
 | 
long | 
getDiscardedPacketsCount()  | 
T | 
getOldest()  | 
long | 
getWeight()  | 
boolean | 
isEmpty()  | 
CompactionResult | 
performCompaction(long from,
                 long to)  | 
ReadOnlyIterator<T> | 
readOnlyIterator(long fromKey)  | 
T | 
removeOldest()
Remove and returns the oldest replication packet in the file 
 | 
long | 
size()  | 
void | 
validateIntegrity()
Validates the integrity of the redo log file 
 | 
forEach, iterator, spliteratorreadOnlyIteratorgetExternalStoragePacketsCount, getExternalStorageSpaceUsed, getMemoryPacketsCountT removeOldest()
T getOldest()
void add(T replicationPacket)
replicationPacket - packet to addlong size()
size in interface IRedoLogFileStatisticslong getApproximateSize()
boolean isEmpty()
ReadOnlyIterator<T> readOnlyIterator(long fromKey)
fromKey - index to start fromvoid deleteOldestPackets(long packetsCount)
packetsCount - number of oldest packets to deletevoid validateIntegrity()
                throws RedoLogFileCompromisedException
RedoLogFileCompromisedExceptionvoid close()
long getWeight()
long getDiscardedPacketsCount()
CompactionResult performCompaction(long from, long to)
from - key to start searching transient packet fromto - key to end searching transient packet fromCopyright © GigaSpaces.