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(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() |
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) |
getLatestBinaryVersion
addFile, addPage, calculateInsideComponentOperation, deleteFile, executeInsideComponentOperation, getExtension, getFilledUpTo, getFullName, getLockName, getName, isFileExists, loadPageForRead, loadPageForRead, loadPageForWrite, openFile, pinPage, 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(OStorage storage, int id, String clusterName, Object... parameters) throws IOException
IOException
public int getBinaryVersion()
public void configure(OStorage storage, OStorageClusterConfiguration config) throws IOException
IOException
public void create(OAtomicOperation atomicOperation, int startSize)
public void registerInStorageConfig(OAtomicOperation atomicOperation, OClusterBasedStorageConfiguration root)
registerInStorageConfig
in class OPaginatedCluster
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 Object set(OAtomicOperation atomicOperation, OCluster.ATTRIBUTES attribute, Object value) throws IOException
IOException
public boolean isSystemCluster()
public float recordGrowFactor()
public float recordOverflowGrowFactor()
public String compression()
public String encryption()
public OPhysicalPosition allocatePosition(OAtomicOperation atomicOperation, byte recordType)
OCluster
recordType
- the type of record of which allocate the position.public OPhysicalPosition createRecord(OAtomicOperation atomicOperation, byte[] content, int recordVersion, byte recordType, OPhysicalPosition allocatedPosition)
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 boolean hideRecord(OAtomicOperation atomicOperation, long position)
OCluster
This 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)
OCluster
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 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.