
public class OPaginatedCluster extends ODurableComponent implements OCluster
| Modifier and Type | Class and Description |
|---|---|
static class |
OPaginatedCluster.RECORD_STATUS |
OCluster.ATTRIBUTES| Modifier and Type | Field and Description |
|---|---|
static String |
DEF_EXTENSION |
static OPhysicalPosition |
NO_POSITION |
atomicOperationsManager, extension, performanceStatisticManager, readCache, storage, writeCache| Constructor and Description |
|---|
OPaginatedCluster(String name,
OAbstractPaginatedStorage storage) |
| Modifier and Type | Method and Description |
|---|---|
OClusterEntryIterator |
absoluteIterator() |
void |
acquireAtomicExclusiveLock()
Acquires exclusive lock in the active atomic operation running on the current thread for this cluster.
|
OPhysicalPosition |
allocatePosition(byte recordType)
Allocates a physical position pointer on the storage for generate an id without a content.
|
OPhysicalPosition[] |
ceilingPositions(OPhysicalPosition position) |
int |
checkClusterConsistency() |
void |
close() |
void |
close(boolean flush) |
void |
compact() |
String |
compression() |
void |
configure(OStorage storage,
int id,
String clusterName,
Object... parameters) |
void |
configure(OStorage storage,
OStorageClusterConfiguration config) |
void |
create(int startSize) |
OPhysicalPosition |
createRecord(byte[] content,
int recordVersion,
byte recordType,
OPhysicalPosition allocatedPosition)
Creates a new record in the cluster.
|
void |
delete() |
boolean |
deleteRecord(long clusterPosition) |
String |
encryption() |
boolean |
exists() |
OPhysicalPosition[] |
floorPositions(OPhysicalPosition position) |
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(long position)
Hides records content by putting tombstone on the records position but does not delete record itself.
|
OPhysicalPosition[] |
higherPositions(OPhysicalPosition position) |
boolean |
isHashBased() |
boolean |
isSystemCluster() |
OPhysicalPosition[] |
lowerPositions(OPhysicalPosition position) |
void |
open() |
OPaginatedClusterDebug |
readDebug(long clusterPosition) |
ORawBuffer |
readRecord(long clusterPosition,
boolean prefetchRecords) |
ORawBuffer |
readRecordIfVersionIsNotLatest(long clusterPosition,
int recordVersion) |
float |
recordGrowFactor() |
float |
recordOverflowGrowFactor() |
void |
recycleRecord(long clusterPosition)
Recycles a deleted record.
|
void |
registerInStorageConfig(OStorageConfigurationImpl root) |
void |
replaceClusterMapFile(File file) |
void |
replaceFile(File file) |
Object |
set(OCluster.ATTRIBUTES attribute,
Object value) |
protected void |
startOperation() |
void |
synch() |
String |
toString() |
void |
truncate()
Truncates the cluster content.
|
void |
updateRecord(long clusterPosition,
byte[] content,
int recordVersion,
byte recordType) |
acquireExclusiveLock, addFile, addPage, completeOperation, deleteFile, endAtomicOperation, getChanges, getExtension, getFilledUpTo, getFullName, getLockName, getName, isFileExists, isFileExists, loadPage, loadPage, openFile, pinPage, releasePage, setName, startAtomicOperation, truncateFileacquireSharedLock, addUser, assertExclusiveLockHold, assertSharedLockHold, getUsers, isConcurrent, releaseExclusiveLock, releaseSharedLock, removeUser, tryAcquireExclusiveLock, tryAcquireSharedLockpublic static final OPhysicalPosition NO_POSITION
public static final String DEF_EXTENSION
public OPaginatedCluster(String name, OAbstractPaginatedStorage storage)
public void configure(OStorage storage, int id, String clusterName, Object... parameters) throws IOException
configure in interface OClusterIOExceptionpublic void configure(OStorage storage, OStorageClusterConfiguration config) throws IOException
configure in interface OClusterIOExceptionpublic void create(int startSize)
throws IOException
create in interface OClusterIOExceptionpublic void registerInStorageConfig(OStorageConfigurationImpl root)
public void open()
throws IOException
open in interface OClusterIOExceptionpublic int checkClusterConsistency()
throws IOException
checkClusterConsistency in interface OClusterIOExceptionpublic void replaceFile(File file) throws IOException
IOExceptionpublic void replaceClusterMapFile(File file) throws IOException
IOExceptionpublic void close()
throws IOException
close in interface OClusterIOExceptionpublic void close(boolean flush)
throws IOException
close in interface OClusterIOExceptionpublic void delete()
throws IOException
delete in interface OClusterIOExceptionpublic Object set(OCluster.ATTRIBUTES attribute, Object value) throws IOException
set in interface OClusterIOExceptionpublic boolean isSystemCluster()
isSystemCluster in interface OClusterpublic float recordGrowFactor()
recordGrowFactor in interface OClusterpublic float recordOverflowGrowFactor()
recordOverflowGrowFactor in interface OClusterpublic String compression()
compression in interface OClusterpublic String encryption()
encryption in interface OClusterpublic OPhysicalPosition allocatePosition(byte recordType) throws IOException
OClusterallocatePosition in interface OClusterrecordType - the type of record of which allocate the position.IOExceptionpublic OPhysicalPosition createRecord(byte[] content, int recordVersion, byte recordType, OPhysicalPosition allocatedPosition) throws IOException
OClustercreateRecord in interface 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.IOExceptionpublic ORawBuffer readRecord(long clusterPosition, boolean prefetchRecords) throws IOException
readRecord in interface OClusterIOExceptionpublic ORawBuffer readRecordIfVersionIsNotLatest(long clusterPosition, int recordVersion) throws IOException, ORecordNotFoundException
readRecordIfVersionIsNotLatest in interface OClusterIOExceptionORecordNotFoundExceptionpublic boolean deleteRecord(long clusterPosition)
throws IOException
deleteRecord in interface OClusterIOExceptionpublic boolean hideRecord(long position)
throws IOException
OClusterThis method is used in case of record content itself is broken and cannot be read or deleted. So it is emergence method.
hideRecord in interface OClusterposition - Position of record in clusterIOExceptionpublic void updateRecord(long clusterPosition,
byte[] content,
int recordVersion,
byte recordType)
throws IOException
updateRecord in interface OClusterIOExceptionpublic void recycleRecord(long clusterPosition)
throws IOException
recycleRecord in interface OClusterIOExceptionpublic long getTombstonesCount()
getTombstonesCount in interface OClusterpublic void truncate()
throws IOException
OClustertruncate in interface OClusterIOExceptionpublic void compact()
throws IOException
compact in interface OClusterIOExceptionpublic OPhysicalPosition getPhysicalPosition(OPhysicalPosition position) throws IOException
OClustergetPhysicalPosition in interface OClusterIOExceptionpublic long getEntries()
getEntries in interface OClusterpublic long getFirstPosition()
throws IOException
getFirstPosition in interface OClusterIOExceptionpublic long getLastPosition()
throws IOException
getLastPosition in interface OClusterIOExceptionpublic long getNextPosition()
throws IOException
getNextPosition in interface OClusterIOExceptionpublic String getFileName()
getFileName in interface OClusterpublic long getFileId()
public void synch()
throws IOException
synch in interface OClusterIOExceptionpublic long getRecordsSize()
throws IOException
OClustergetRecordsSize in interface OClusterIOExceptionpublic boolean isHashBased()
isHashBased in interface OClusterpublic OClusterEntryIterator absoluteIterator()
absoluteIterator in interface OClusterpublic OPhysicalPosition[] higherPositions(OPhysicalPosition position) throws IOException
higherPositions in interface OClusterIOExceptionpublic OPhysicalPosition[] ceilingPositions(OPhysicalPosition position) throws IOException
ceilingPositions in interface OClusterIOExceptionpublic OPhysicalPosition[] lowerPositions(OPhysicalPosition position) throws IOException
lowerPositions in interface OClusterIOExceptionpublic OPhysicalPosition[] floorPositions(OPhysicalPosition position) throws IOException
floorPositions in interface OClusterIOExceptionpublic ORecordConflictStrategy getRecordConflictStrategy()
getRecordConflictStrategy in interface OClusterprotected void startOperation()
startOperation in class ODurableComponentpublic OPaginatedClusterDebug readDebug(long clusterPosition) throws IOException
IOExceptionpublic OPaginatedCluster.RECORD_STATUS getRecordStatus(long clusterPosition) throws IOException
IOExceptionpublic void acquireAtomicExclusiveLock()
OClusteracquireAtomicExclusiveLock in interface OClusterCopyright © 2009–2025 OrientDB. All rights reserved.