public final class OPaginatedClusterV0 extends OPaginatedCluster
OPaginatedCluster.RECORD_STATUS
OCluster.ATTRIBUTES
DEF_EXTENSION
atomicOperationsManager, readCache, storage, writeCache
Constructor and Description |
---|
OPaginatedClusterV0(String name,
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(byte recordType,
OAtomicOperation atomicOperation)
Allocates a physical position pointer on the storage for generate an id without a content.
|
OPhysicalPosition[] |
ceilingPositions(OPhysicalPosition position) |
void |
close() |
void |
close(boolean flush) |
String |
compression() |
void |
configure(int id,
String clusterName) |
void |
configure(OStorage storage,
OStorageClusterConfiguration config) |
void |
create(OAtomicOperation atomicOperation) |
OPhysicalPosition |
createRecord(byte[] content,
int recordVersion,
byte recordType,
OPhysicalPosition allocatedPosition,
OAtomicOperation atomicOperation)
Creates a new record in the cluster.
|
void |
delete(OAtomicOperation atomicOperation) |
boolean |
deleteRecord(OAtomicOperation atomicOperation,
long clusterPosition) |
String |
encryption() |
boolean |
exists() |
OPhysicalPosition[] |
floorPositions(OPhysicalPosition position) |
OStoragePaginatedClusterConfiguration |
generateClusterConfig() |
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() |
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) |
void |
setClusterName(String newName) |
void |
setEncryption(String method,
String key) |
void |
setRecordConflictStrategy(String stringValue) |
void |
synch() |
String |
toString() |
void |
updateRecord(long clusterPosition,
byte[] content,
int recordVersion,
byte recordType,
OAtomicOperation atomicOperation) |
getLatestBinaryVersion, replaceClusterMapFile, replaceFile
addFile, addPage, calculateInsideComponentOperation, deleteFile, executeInsideComponentOperation, getExtension, getFilledUpTo, getFullName, getLockName, getName, isFileExists, loadPageForRead, loadPageForRead, loadPageForWrite, openFile, releasePageFromRead, releasePageFromWrite, setName, truncateFile, tryExecuteInsideComponentOperation
acquireExclusiveLock, acquireSharedLock, addUser, assertExclusiveLockHold, assertSharedLockHold, getUsers, isConcurrent, releaseExclusiveLock, releaseSharedLock, removeUser, tryAcquireExclusiveLock, tryAcquireSharedLock
public OPaginatedClusterV0(String name, OAbstractPaginatedStorage storage)
public void configure(int id, String clusterName) throws IOException
IOException
public int getBinaryVersion()
public OStoragePaginatedClusterConfiguration generateClusterConfig()
generateClusterConfig
in class OPaginatedCluster
public void configure(OStorage storage, OStorageClusterConfiguration config) throws IOException
IOException
public boolean exists()
public void create(OAtomicOperation atomicOperation)
public void open() throws IOException
IOException
public void close() throws IOException
IOException
public void close(boolean flush) throws IOException
IOException
public void delete(OAtomicOperation atomicOperation)
public boolean isSystemCluster()
public String compression()
public String encryption()
public OPhysicalPosition allocatePosition(byte recordType, OAtomicOperation atomicOperation)
OCluster
recordType
- the type of record of which allocate the position.public OPhysicalPosition createRecord(byte[] content, int recordVersion, byte recordType, OPhysicalPosition allocatedPosition, OAtomicOperation atomicOperation)
OCluster
content
- 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
IOException
public ORawBuffer readRecordIfVersionIsNotLatest(long clusterPosition, int recordVersion) throws IOException, ORecordNotFoundException
IOException
ORecordNotFoundException
public boolean deleteRecord(OAtomicOperation atomicOperation, long clusterPosition)
public void updateRecord(long clusterPosition, byte[] content, int recordVersion, byte recordType, OAtomicOperation atomicOperation)
public long getTombstonesCount()
public OPhysicalPosition getPhysicalPosition(OPhysicalPosition position) throws IOException
OCluster
IOException
public boolean isDeleted(OPhysicalPosition position) throws IOException
OCluster
IOException
public long getEntries()
public long getFirstPosition() throws IOException
IOException
public long getLastPosition() throws IOException
IOException
public long getNextPosition() throws IOException
IOException
public String getFileName()
public int getId()
public long getFileId()
getFileId
in class OPaginatedCluster
public void synch()
public long getRecordsSize() throws IOException
OCluster
IOException
public OPhysicalPosition[] higherPositions(OPhysicalPosition position) throws IOException
IOException
public OPhysicalPosition[] ceilingPositions(OPhysicalPosition position) throws IOException
IOException
public OPhysicalPosition[] lowerPositions(OPhysicalPosition position) throws IOException
IOException
public OPhysicalPosition[] floorPositions(OPhysicalPosition position) throws IOException
IOException
public ORecordConflictStrategy getRecordConflictStrategy()
public void setRecordConflictStrategy(String stringValue)
public void setClusterName(String newName)
public OPaginatedClusterDebug readDebug(long clusterPosition) throws IOException
readDebug
in class OPaginatedCluster
IOException
public OPaginatedCluster.RECORD_STATUS getRecordStatus(long clusterPosition) throws IOException
getRecordStatus
in class OPaginatedCluster
IOException
public void acquireAtomicExclusiveLock()
OCluster
public OClusterBrowsePage nextPage(long lastPosition) throws IOException
IOException
Copyright © 2009–2020 OrientDB. All rights reserved.