Class StorageSegment
java.lang.Object
com.gigaspaces.internal.server.space.redolog.storage.bytebuffer.StorageSegment
A single segment inside a
ByteBufferRedoLogFileStorage- Since:
- 7.1
- Author:
- eitany
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionStorageSegment(IByteBufferStorageFactory storageProvider, IStorageSegmentsMediator segmentsMediator, int maxReaders) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIndex(int packetCountFromLastIndex, long distanceFromLastIndex) longadjustReader(IByteBufferStorageCursor reader, long packetPosition) voidclear()voiddecreaseNumOfPackets(long numOfPackets) voiddecreaseWeight(long weight) voiddelete()longgetIndexPosition(int packetPosition) getName()intlonglongintintlongvoidincreaseNumOfPackets(long numOfPackets) voidincreaseWeight(long weight) voidcom.gigaspaces.internal.server.space.redolog.storage.bytebuffer.StorageSegment.IndexsearchIndex(long packetPosition) voidsetUnindexedState(int unindexedLength, int unindexedPacketsCount)
-
Constructor Details
-
StorageSegment
public StorageSegment(IByteBufferStorageFactory storageProvider, IStorageSegmentsMediator segmentsMediator, int maxReaders) throws ByteBufferStorageException - Throws:
ByteBufferStorageException
-
-
Method Details
-
getName
-
getCursorForWriting
-
sealWriter
public void sealWriter() -
getCursorForReading
- Throws:
ByteBufferStorageException
-
clear
- Throws:
ByteBufferStorageException
-
getPosition
public long getPosition() -
increaseNumOfPackets
public void increaseNumOfPackets(long numOfPackets) -
getNumOfPackets
public long getNumOfPackets() -
getNumOfDeletedPackets
public int getNumOfDeletedPackets() -
delete
public void delete() -
decreaseNumOfPackets
public void decreaseNumOfPackets(long numOfPackets) -
setUnindexedState
public void setUnindexedState(int unindexedLength, int unindexedPacketsCount) -
getUnindexedLength
public int getUnindexedLength() -
getUnindexedPackets
public int getUnindexedPackets() -
addIndex
public void addIndex(int packetCountFromLastIndex, long distanceFromLastIndex) -
adjustReader
-
getIndexPosition
public long getIndexPosition(int packetPosition) -
searchIndex
public com.gigaspaces.internal.server.space.redolog.storage.bytebuffer.StorageSegment.Index searchIndex(long packetPosition) -
increaseWeight
public void increaseWeight(long weight) -
decreaseWeight
public void decreaseWeight(long weight) -
getWeight
public long getWeight()
-