Class OClusterRemote
java.lang.Object
com.orientechnologies.orient.client.remote.OClusterRemote
- All Implemented Interfaces:
OCluster,OClusterInfo
Remote cluster implementation
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.orientechnologies.orient.core.storage.OCluster
OCluster.ATTRIBUTES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAcquires exclusive lock in the active atomic operation running on the current thread for this cluster.allocatePosition(byte recordType, OAtomicOperation atomicOperation) Allocates a physical position pointer on the storage for generate an id without a content.ceilingPositions(OPhysicalPosition position) voidclose()voidclose(boolean flush) voidvoidconfigure(OStorage iStorage, OStorageClusterConfiguration iConfig) voidcreate(OAtomicOperation atomicOperation) createRecord(byte[] content, int recordVersion, byte recordType, OPhysicalPosition allocatedPosition, OAtomicOperation atomicOperation) Creates a new record in the cluster.voiddelete(OAtomicOperation atomicOperation) booleandeleteRecord(OAtomicOperation atomicOperation, long clusterPosition) booleanexists()floorPositions(OPhysicalPosition position) intlonglongintgetId()longgetName()longgetPhysicalPosition(OPhysicalPosition iPPosition) Fills and return the PhysicalPosition object received as parameter with the physical position of logical record iPositionlongReturns the size of the records contained in the cluster in bytes.higherPositions(OPhysicalPosition position) booleanisDeleted(OPhysicalPosition iPPosition) Check if a rid is existent and deleted or not existent return true only if delete flag is set.booleanlowerPositions(OPhysicalPosition position) nextPage(long lastPosition) voidopen(OAtomicOperation atomicOperation) readRecord(long clusterPosition) readRecordIfVersionIsNotLatest(long clusterPosition, int recordVersion) set(OCluster.ATTRIBUTES iAttribute, Object iValue) voidsetClusterName(String name) voidsetEncryption(String encryptionName, String encryptionKey) voidsetRecordConflictStrategy(String conflictStrategy) voidsynch()voidupdateRecord(long clusterPosition, byte[] content, int recordVersion, byte recordType, OAtomicOperation atomicOperation) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.storage.OCluster
getRecordConflictStrategyName
-
Constructor Details
-
OClusterRemote
public OClusterRemote()
-
-
Method Details
-
configure
-
configure
-
create
-
open
-
close
public void close() -
close
public void close(boolean flush) -
allocatePosition
Description copied from interface:OClusterAllocates a physical position pointer on the storage for generate an id without a content.- Specified by:
allocatePositionin interfaceOCluster- Parameters:
recordType- the type of record of which allocate the position.- Returns:
- the allocated position.
-
createRecord
public OPhysicalPosition createRecord(byte[] content, int recordVersion, byte recordType, OPhysicalPosition allocatedPosition, OAtomicOperation atomicOperation) Description copied from interface:OClusterCreates a new record in the cluster.- Specified by:
createRecordin interfaceOCluster- Parameters:
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.- Returns:
- the position where the record si created.
-
deleteRecord
- Specified by:
deleteRecordin interfaceOCluster
-
updateRecord
public void updateRecord(long clusterPosition, byte[] content, int recordVersion, byte recordType, OAtomicOperation atomicOperation) - Specified by:
updateRecordin interfaceOCluster
-
readRecord
- Specified by:
readRecordin interfaceOCluster
-
readRecordIfVersionIsNotLatest
public ORawBuffer readRecordIfVersionIsNotLatest(long clusterPosition, int recordVersion) throws ORecordNotFoundException - Specified by:
readRecordIfVersionIsNotLatestin interfaceOCluster- Throws:
ORecordNotFoundException
-
setClusterName
- Specified by:
setClusterNamein interfaceOCluster
-
setRecordConflictStrategy
- Specified by:
setRecordConflictStrategyin interfaceOCluster
-
setEncryption
- Specified by:
setEncryptionin interfaceOCluster
-
exists
public boolean exists() -
delete
-
set
-
encryption
- Specified by:
encryptionin interfaceOCluster- Specified by:
encryptionin interfaceOClusterInfo
-
getPhysicalPosition
Description copied from interface:OClusterFills and return the PhysicalPosition object received as parameter with the physical position of logical record iPosition- Specified by:
getPhysicalPositionin interfaceOCluster
-
getEntries
public long getEntries()- Specified by:
getEntriesin interfaceOCluster- Specified by:
getEntriesin interfaceOClusterInfo
-
getFirstPosition
public long getFirstPosition()- Specified by:
getFirstPositionin interfaceOCluster
-
getLastPosition
public long getLastPosition()- Specified by:
getLastPositionin interfaceOCluster
-
getNextPosition
public long getNextPosition()- Specified by:
getNextPositionin interfaceOCluster
-
getFileName
- Specified by:
getFileNamein interfaceOCluster- Specified by:
getFileNamein interfaceOClusterInfo
-
getId
public int getId()- Specified by:
getIdin interfaceOCluster- Specified by:
getIdin interfaceOClusterInfo
-
synch
public void synch() -
getName
- Specified by:
getNamein interfaceOCluster- Specified by:
getNamein interfaceOClusterInfo
-
getRecordsSize
public long getRecordsSize()Description copied from interface:OClusterReturns the size of the records contained in the cluster in bytes.- Specified by:
getRecordsSizein interfaceOCluster
-
isSystemCluster
public boolean isSystemCluster()- Specified by:
isSystemClusterin interfaceOCluster
-
higherPositions
- Specified by:
higherPositionsin interfaceOCluster
-
lowerPositions
- Specified by:
lowerPositionsin interfaceOCluster
-
ceilingPositions
- Specified by:
ceilingPositionsin interfaceOCluster
-
floorPositions
- Specified by:
floorPositionsin interfaceOCluster
-
isDeleted
Description copied from interface:OClusterCheck if a rid is existent and deleted or not existent return true only if delete flag is set. -
compression
- Specified by:
compressionin interfaceOCluster
-
getRecordConflictStrategy
- Specified by:
getRecordConflictStrategyin interfaceOCluster
-
acquireAtomicExclusiveLock
public void acquireAtomicExclusiveLock()Description copied from interface:OClusterAcquires exclusive lock in the active atomic operation running on the current thread for this cluster.- Specified by:
acquireAtomicExclusiveLockin interfaceOCluster
-
nextPage
-
getBinaryVersion
public int getBinaryVersion()- Specified by:
getBinaryVersionin interfaceOCluster
-