Package com.gigaspaces.blobstore.rocksdb
Class RocksDBBlobStoreHandler
java.lang.Object
com.gigaspaces.server.blobstore.BlobStoreStorageHandler
com.gigaspaces.blobstore.rocksdb.RocksDBBlobStoreHandler
- All Implemented Interfaces:
ServiceDetailsProvider,ServiceMonitorsProvider
public class RocksDBBlobStoreHandler
extends BlobStoreStorageHandler
implements ServiceDetailsProvider, ServiceMonitorsProvider
- Since:
- 11.0.0
- Author:
- kobi on 17/9/15.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(Serializable id, Serializable data, BlobStoreObjectType objectType) Add the specified id with the specified data .voidcleanup()voidclose().org.rocksdb.RocksIteratororg.rocksdb.RocksIteratororg.rocksdb.RocksIteratororg.rocksdb.RocksIteratororg.rocksdb.RocksIteratorexecuteBulk(List<BlobStoreBulkOperationRequest> operations, BlobStoreObjectType objectType, boolean transactional) .get(Serializable id, Object position, BlobStoreObjectType objectType) Returns the data to which the specified id is mapped,protected longprotected longprotected XAPColumnFamilyOptionsprotected XAPDBOptionsprotected String.Retruns one or more service details that the service exposes.Retruns one or more service details that the service exposes.voidinitialize(BlobStoreConfig blobStoreConfig) initialize a blob-store implementation.protected booleaniterator(BlobStoreObjectType objectType) .remove(Serializable id, Object position, BlobStoreObjectType objectType) Removes the id (and its corresponding data) from this FDF.replace(Serializable id, Serializable data, Object position, BlobStoreObjectType objectType) Replace the data to which the specified id is mapped with new data,
-
Constructor Details
-
RocksDBBlobStoreHandler
-
-
Method Details
-
getCacheSizeMB
protected long getCacheSizeMB() -
getBlockSizeKB
protected long getBlockSizeKB() -
cleanup
public void cleanup()- Overrides:
cleanupin classBlobStoreStorageHandler
-
initialize
Description copied from class:BlobStoreStorageHandlerinitialize a blob-store implementation.- Overrides:
initializein classBlobStoreStorageHandler- Parameters:
blobStoreConfig- - Configuration for blobstore implementation.
-
getProperties
Description copied from class:BlobStoreStorageHandler. returns the properties passed (and also optionally set) by the blobstore handler.- Overrides:
getPropertiesin classBlobStoreStorageHandler- Returns:
- properties.
-
add
Description copied from class:BlobStoreStorageHandlerAdd the specified id with the specified data . Neither the id nor the data can be null.- Specified by:
addin classBlobStoreStorageHandler- Parameters:
id- id with which the specified value is to be associateddata- data to be associated with the specified idobjectType- the object type - one of BlobStoreObjectType values- Returns:
- an optional position object which will be used as a pointer of locating the id, if the operation succeeded, or null if irrelevant
-
get
Description copied from class:BlobStoreStorageHandlerReturns the data to which the specified id is mapped,- Specified by:
getin classBlobStoreStorageHandler- Parameters:
id- id with which the specified data is to be associatedposition- optional position object which will be used as a pointer of locating the id, or null if irrelevantobjectType- the object type - one of BlobStoreObjectType values- Returns:
- the data to which the specified id is mapped,
-
replace
public Object replace(Serializable id, Serializable data, Object position, BlobStoreObjectType objectType) Description copied from class:BlobStoreStorageHandlerReplace the data to which the specified id is mapped with new data,- Specified by:
replacein classBlobStoreStorageHandler- Parameters:
id- id with which the specified data is to be associateddata- the new data to replace the existing one.position- optional position object which will be used as a pointer of locating the id, or null if irrelevantobjectType- the object type - one of BlobStoreObjectType values- Returns:
- the new postion - an optional position object which will be used as a pointer of locating the id, or null if irrelevant
-
getStatistics
- Overrides:
getStatisticsin classBlobStoreStorageHandler
-
remove
Description copied from class:BlobStoreStorageHandlerRemoves the id (and its corresponding data) from this FDF.- Specified by:
removein classBlobStoreStorageHandler- Parameters:
id- the key that needs to be removedposition- optional position object which will be used as a pointer of locating the id, or null if irrelevantobjectType- the object type - one of BlobStoreObjectType values- Returns:
- the data to which the specified id is mapped,
-
executeBulk
public List<BlobStoreBulkOperationResult> executeBulk(List<BlobStoreBulkOperationRequest> operations, BlobStoreObjectType objectType, boolean transactional) Description copied from class:BlobStoreStorageHandler. execute a bulk of operations on the blobstore. return a corresoping list of results note- a non-abstract method, if not implemented the individual operations will be executed one by one- Overrides:
executeBulkin classBlobStoreStorageHandler- Parameters:
operations- - a list of operations to performobjectType- the object type - one of BlobStoreObjectType valuestransactional- - true if the bulk is to be performed in the blobstore as one logical transaction if the blobstore supports transactions, false otherwise- Returns:
- a list of results which corresponds to the input list of operations. if one or more operations fail the returned result element will contain exception . if transactional parameter is true a general exception should be thrown instead of a returned result element with exception data
-
iterator
Description copied from class:BlobStoreStorageHandler. creates an iterator over the blobstore objeccts. note- a non-abstract method, if not implemented null will be returned- Overrides:
iteratorin classBlobStoreStorageHandler- Parameters:
objectType- the object type - one of BlobStoreObjectType values- Returns:
- an iterator over the blobstore objects which belong to the requested objectType.
-
isPersistent
- Overrides:
isPersistentin classBlobStoreStorageHandler
-
close
public void close()Description copied from class:BlobStoreStorageHandler. close the blobstore handler. note- a non-abstract method- Overrides:
closein classBlobStoreStorageHandler
-
createDataRocksIterator
public org.rocksdb.RocksIterator createDataRocksIterator() -
createMetadataRocksIterator
public org.rocksdb.RocksIterator createMetadataRocksIterator() -
createSyncListRocksIterator
public org.rocksdb.RocksIterator createSyncListRocksIterator() -
createSyncOverflowRocksIterator
public org.rocksdb.RocksIterator createSyncOverflowRocksIterator() -
createAdminRocksIterator
public org.rocksdb.RocksIterator createAdminRocksIterator() -
getServicesMonitors
Description copied from interface:ServiceMonitorsProviderRetruns one or more service details that the service exposes.- Specified by:
getServicesMonitorsin interfaceServiceMonitorsProvider
-
getServicesDetails
Description copied from interface:ServiceDetailsProviderRetruns one or more service details that the service exposes.- Specified by:
getServicesDetailsin interfaceServiceDetailsProvider
-
getDBOptions
-
getDataColumnFamilyOptions
-
getMappingDir
-
isCentralStorage
protected boolean isCentralStorage()
-