
public final class OPaginatedClusterV1 extends OPaginatedCluster
OPaginatedCluster.RECORD_STATUSOCluster.ATTRIBUTESDEF_EXTENSIONatomicOperationsManager, readCache, storage, writeCache| Constructor and Description |
|---|
OPaginatedClusterV1(String name,
OAbstractPaginatedStorage storage) |
OPaginatedClusterV1(String name,
String dataExtension,
String cpmExtension,
OAbstractPaginatedStorage storage) |
| Modifier and Type | Method and Description |
|---|---|
void |
acquireAtomicExclusiveLock()
Acquires exclusive lock in the active atomic operation running on the current thread for this cluster.
|
OPhysicalPosition |
allocatePosition(OAtomicOperation atomicOperation,
byte recordType)
Allocates a physical position pointer on the storage for generate an id without a content.
|
OPhysicalPosition[] |
ceilingPositions(OPhysicalPosition position) |
void |
close(boolean flush) |
String |
compression() |
void |
configure(OStorage storage,
int id,
String clusterName,
Object... parameters) |
void |
configure(OStorage storage,
OStorageClusterConfiguration config) |
void |
create(OAtomicOperation atomicOperation,
int startSize) |
OPhysicalPosition |
createRecord(OAtomicOperation atomicOperation,
byte[] content,
int recordVersion,
byte recordType,
OPhysicalPosition allocatedPosition)
Creates a new record in the cluster.
|
void |
delete(OAtomicOperation atomicOperation) |
boolean |
deleteRecord(OAtomicOperation atomicOperation,
long clusterPosition) |
String |
encryption() |
OPhysicalPosition[] |
floorPositions(OPhysicalPosition position) |
int |
getBinaryVersion() |
long |
getEntries() |
long |
getFileId()
Returns the fileId used in disk cache.
|
String |
getFileName() |
long |
getFirstPosition() |
int |
getId() |
long |
getLastPosition() |
long |
getNextPosition() |
OPhysicalPosition |
getPhysicalPosition(OPhysicalPosition position)
Fills and return the PhysicalPosition object received as parameter with the physical position of logical record iPosition
|
ORecordConflictStrategy |
getRecordConflictStrategy() |
long |
getRecordsSize()
Returns the size of the records contained in the cluster in bytes.
|
OPaginatedCluster.RECORD_STATUS |
getRecordStatus(long clusterPosition) |
long |
getTombstonesCount() |
boolean |
hideRecord(OAtomicOperation atomicOperation,
long position)
Hides records content by putting tombstone on the records position but does not delete record itself.
|
OPhysicalPosition[] |
higherPositions(OPhysicalPosition position) |
boolean |
isDeleted(OPhysicalPosition position)
Check if a rid is existent and deleted or not existent
return true only if delete flag is set.
|
boolean |
isSystemCluster() |
OPhysicalPosition[] |
lowerPositions(OPhysicalPosition position) |
OClusterBrowsePage |
nextPage(long lastPosition) |
void |
open() |
OPaginatedClusterDebug |
readDebug(long clusterPosition) |
ORawBuffer |
readRecord(long clusterPosition,
boolean prefetchRecords) |
ORawBuffer |
readRecordIfVersionIsNotLatest(long clusterPosition,
int recordVersion) |
float |
recordGrowFactor() |
float |
recordOverflowGrowFactor() |
void |
recycleRecord(OAtomicOperation atomicOperation,
long clusterPosition,
byte[] content,
int recordVersion,
byte recordType)
Recycles a deleted record.
|
void |
registerInStorageConfig(OAtomicOperation atomicOperation,
OClusterBasedStorageConfiguration root) |
Object |
set(OAtomicOperation atomicOperation,
OCluster.ATTRIBUTES attribute,
Object value) |
void |
synch() |
String |
toString() |
void |
truncate(OAtomicOperation atomicOperation)
Truncates the cluster content.
|
void |
updateRecord(OAtomicOperation atomicOperation,
long clusterPosition,
byte[] content,
int recordVersion,
byte recordType) |
getLatestBinaryVersionaddFile, addPage, calculateInsideComponentOperation, deleteFile, executeInsideComponentOperation, getExtension, getFilledUpTo, getFullName, getLockName, getName, isFileExists, loadPageForRead, loadPageForRead, loadPageForWrite, openFile, pinPage, releasePageFromRead, releasePageFromWrite, setName, truncateFile, tryExecuteInsideComponentOperationacquireExclusiveLock, acquireSharedLock, addUser, assertExclusiveLockHold, assertSharedLockHold, getUsers, isConcurrent, releaseExclusiveLock, releaseSharedLock, removeUser, tryAcquireExclusiveLock, tryAcquireSharedLockpublic OPaginatedClusterV1(String name, OAbstractPaginatedStorage storage)
public OPaginatedClusterV1(String name, String dataExtension, String cpmExtension, OAbstractPaginatedStorage storage)
public void configure(OStorage storage, int id, String clusterName, Object... parameters) throws IOException
IOExceptionpublic int getBinaryVersion()
public void configure(OStorage storage, OStorageClusterConfiguration config) throws IOException
IOExceptionpublic void create(OAtomicOperation atomicOperation, int startSize)
public void registerInStorageConfig(OAtomicOperation atomicOperation, OClusterBasedStorageConfiguration root)
registerInStorageConfig in class OPaginatedClusterpublic void open()
throws IOException
IOExceptionpublic void close(boolean flush)
public void delete(OAtomicOperation atomicOperation)
public Object set(OAtomicOperation atomicOperation, OCluster.ATTRIBUTES attribute, Object value) throws IOException
IOExceptionpublic boolean isSystemCluster()
public float recordGrowFactor()
public float recordOverflowGrowFactor()
public String compression()
public String encryption()
public OPhysicalPosition allocatePosition(OAtomicOperation atomicOperation, byte recordType)
OClusterrecordType - the type of record of which allocate the position.public OPhysicalPosition createRecord(OAtomicOperation atomicOperation, byte[] content, int recordVersion, byte recordType, OPhysicalPosition allocatedPosition)
OClustercontent - the content of the record.recordVersion - the current versionrecordType - the type of the recordallocatedPosition - the eventual allocated position or null if there is no allocated position.public ORawBuffer readRecord(long clusterPosition, boolean prefetchRecords) throws IOException
IOExceptionpublic ORawBuffer readRecordIfVersionIsNotLatest(long clusterPosition, int recordVersion) throws IOException, ORecordNotFoundException
IOExceptionORecordNotFoundExceptionpublic boolean deleteRecord(OAtomicOperation atomicOperation, long clusterPosition)
public boolean hideRecord(OAtomicOperation atomicOperation, long position)
OClusterThis method is used in case of record content itself is broken and cannot be read or deleted. So it is emergence method.
position - Position of record in clusterpublic void updateRecord(OAtomicOperation atomicOperation, long clusterPosition, byte[] content, int recordVersion, byte recordType)
public void recycleRecord(OAtomicOperation atomicOperation, long clusterPosition, byte[] content, int recordVersion, byte recordType)
public long getTombstonesCount()
public void truncate(OAtomicOperation atomicOperation)
OClusterpublic OPhysicalPosition getPhysicalPosition(OPhysicalPosition position) throws IOException
OClusterIOExceptionpublic boolean isDeleted(OPhysicalPosition position) throws IOException
OClusterIOExceptionpublic long getEntries()
public long getFirstPosition()
throws IOException
IOExceptionpublic long getLastPosition()
throws IOException
IOExceptionpublic long getNextPosition()
throws IOException
IOExceptionpublic String getFileName()
public int getId()
public long getFileId()
getFileId in class OPaginatedClusterpublic void synch()
public long getRecordsSize()
throws IOException
OClusterIOExceptionpublic OPhysicalPosition[] higherPositions(OPhysicalPosition position) throws IOException
IOExceptionpublic OPhysicalPosition[] ceilingPositions(OPhysicalPosition position) throws IOException
IOExceptionpublic OPhysicalPosition[] lowerPositions(OPhysicalPosition position) throws IOException
IOExceptionpublic OPhysicalPosition[] floorPositions(OPhysicalPosition position) throws IOException
IOExceptionpublic ORecordConflictStrategy getRecordConflictStrategy()
public OPaginatedClusterDebug readDebug(long clusterPosition) throws IOException
readDebug in class OPaginatedClusterIOExceptionpublic OPaginatedCluster.RECORD_STATUS getRecordStatus(long clusterPosition) throws IOException
getRecordStatus in class OPaginatedClusterIOExceptionpublic void acquireAtomicExclusiveLock()
OClusterpublic OClusterBrowsePage nextPage(long lastPosition) throws IOException
IOExceptionCopyright © 2009–2025 OrientDB. All rights reserved.