public interface OCluster
Modifier and Type | Interface and Description |
---|---|
static class |
OCluster.ATTRIBUTES |
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 iStorage,
int iId,
String iClusterName,
Object... iParameters) |
void |
configure(OStorage iStorage,
OStorageClusterConfiguration iConfig) |
void |
create(OAtomicOperation atomicOperation,
int iStartSize) |
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() |
String |
getFileName() |
long |
getFirstPosition() |
int |
getId() |
long |
getLastPosition() |
String |
getName() |
long |
getNextPosition() |
OPhysicalPosition |
getPhysicalPosition(OPhysicalPosition iPPosition)
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.
|
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 iPPosition)
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() |
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)
Recycling a record position that was deleted.
|
Object |
set(OAtomicOperation atomicOperation,
OCluster.ATTRIBUTES iAttribute,
Object iValue) |
void |
synch() |
void |
truncate(OAtomicOperation atomicOperation)
Truncates the cluster content.
|
void |
updateRecord(OAtomicOperation atomicOperation,
long clusterPosition,
byte[] content,
int recordVersion,
byte recordType) |
void configure(OStorage iStorage, int iId, String iClusterName, Object... iParameters) throws IOException
IOException
void configure(OStorage iStorage, OStorageClusterConfiguration iConfig) throws IOException
IOException
void create(OAtomicOperation atomicOperation, int iStartSize) throws IOException
IOException
void open() throws IOException
IOException
void close() throws IOException
IOException
void close(boolean flush) throws IOException
IOException
void delete(OAtomicOperation atomicOperation) throws IOException
IOException
Object set(OAtomicOperation atomicOperation, OCluster.ATTRIBUTES iAttribute, Object iValue) throws IOException
IOException
String encryption()
long getTombstonesCount()
void truncate(OAtomicOperation atomicOperation) throws IOException
atomicOperation
- IOException
OPhysicalPosition allocatePosition(OAtomicOperation atomicOperation, byte recordType) throws IOException
atomicOperation
- recordType
- the type of record of which allocate the position.IOException
OPhysicalPosition createRecord(OAtomicOperation atomicOperation, byte[] content, int recordVersion, byte recordType, OPhysicalPosition allocatedPosition) throws IOException
atomicOperation
- 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.IOException
boolean deleteRecord(OAtomicOperation atomicOperation, long clusterPosition) throws IOException
IOException
void updateRecord(OAtomicOperation atomicOperation, long clusterPosition, byte[] content, int recordVersion, byte recordType) throws IOException
IOException
void recycleRecord(OAtomicOperation atomicOperation, long clusterPosition, byte[] content, int recordVersion, byte recordType) throws IOException
IOException
ORawBuffer readRecord(long clusterPosition, boolean prefetchRecords) throws IOException
IOException
ORawBuffer readRecordIfVersionIsNotLatest(long clusterPosition, int recordVersion) throws IOException, ORecordNotFoundException
IOException
ORecordNotFoundException
OPhysicalPosition getPhysicalPosition(OPhysicalPosition iPPosition) throws IOException
IOException
boolean isDeleted(OPhysicalPosition iPPosition) throws IOException
IOException
long getEntries()
long getFirstPosition() throws IOException
IOException
long getLastPosition() throws IOException
IOException
long getNextPosition() throws IOException
IOException
String getFileName()
int getId()
void synch() throws IOException
IOException
String getName()
long getRecordsSize() throws IOException
IOException
float recordGrowFactor()
String compression()
float recordOverflowGrowFactor()
boolean isSystemCluster()
OPhysicalPosition[] higherPositions(OPhysicalPosition position) throws IOException
IOException
OPhysicalPosition[] ceilingPositions(OPhysicalPosition position) throws IOException
IOException
OPhysicalPosition[] lowerPositions(OPhysicalPosition position) throws IOException
IOException
OPhysicalPosition[] floorPositions(OPhysicalPosition position) throws IOException
IOException
boolean hideRecord(OAtomicOperation atomicOperation, long position) throws IOException
This method is used in case of record content itself is broken and cannot be read or deleted. So it is emergence method.
atomicOperation
- position
- Position of record in clusterUnsupportedOperationException
- In case current version of cluster does not support given operation.IOException
ORecordConflictStrategy getRecordConflictStrategy()
void acquireAtomicExclusiveLock()
OClusterBrowsePage nextPage(long lastPosition) throws IOException
IOException
int getBinaryVersion()
Copyright © 2009–2020 OrientDB. All rights reserved.