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 Details

  • Method Details

    • getCacheSizeMB

      protected long getCacheSizeMB()
    • getBlockSizeKB

      protected long getBlockSizeKB()
    • cleanup

      public void cleanup()
      Overrides:
      cleanup in class BlobStoreStorageHandler
    • initialize

      public void initialize(BlobStoreConfig blobStoreConfig)
      Description copied from class: BlobStoreStorageHandler
      initialize a blob-store implementation.
      Overrides:
      initialize in class BlobStoreStorageHandler
      Parameters:
      blobStoreConfig - - Configuration for blobstore implementation.
    • getProperties

      public Properties getProperties()
      Description copied from class: BlobStoreStorageHandler
      . returns the properties passed (and also optionally set) by the blobstore handler.
      Overrides:
      getProperties in class BlobStoreStorageHandler
      Returns:
      properties.
    • add

      public Object add(Serializable id, Serializable data, BlobStoreObjectType objectType)
      Description copied from class: BlobStoreStorageHandler
      Add the specified id with the specified data . Neither the id nor the data can be null.
      Specified by:
      add in class BlobStoreStorageHandler
      Parameters:
      id - id with which the specified value is to be associated
      data - data to be associated with the specified id
      objectType - 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

      public Serializable get(Serializable id, Object position, BlobStoreObjectType objectType)
      Description copied from class: BlobStoreStorageHandler
      Returns the data to which the specified id is mapped,
      Specified by:
      get in class BlobStoreStorageHandler
      Parameters:
      id - id with which the specified data is to be associated
      position - optional position object which will be used as a pointer of locating the id, or null if irrelevant
      objectType - 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: BlobStoreStorageHandler
      Replace the data to which the specified id is mapped with new data,
      Specified by:
      replace in class BlobStoreStorageHandler
      Parameters:
      id - id with which the specified data is to be associated
      data - 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 irrelevant
      objectType - 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

      public BlobStoreStorageStatistics getStatistics()
      Overrides:
      getStatistics in class BlobStoreStorageHandler
    • remove

      public Serializable remove(Serializable id, Object position, BlobStoreObjectType objectType)
      Description copied from class: BlobStoreStorageHandler
      Removes the id (and its corresponding data) from this FDF.
      Specified by:
      remove in class BlobStoreStorageHandler
      Parameters:
      id - the key that needs to be removed
      position - optional position object which will be used as a pointer of locating the id, or null if irrelevant
      objectType - 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:
      executeBulk in class BlobStoreStorageHandler
      Parameters:
      operations - - a list of operations to perform
      objectType - the object type - one of BlobStoreObjectType values
      transactional - - 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:
      iterator in class BlobStoreStorageHandler
      Parameters:
      objectType - the object type - one of BlobStoreObjectType values
      Returns:
      an iterator over the blobstore objects which belong to the requested objectType.
    • isPersistent

      public Boolean isPersistent()
      Overrides:
      isPersistent in class BlobStoreStorageHandler
    • close

      public void close()
      Description copied from class: BlobStoreStorageHandler
      . close the blobstore handler. note- a non-abstract method
      Overrides:
      close in class BlobStoreStorageHandler
    • 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

      public ServiceMonitors[] getServicesMonitors()
      Description copied from interface: ServiceMonitorsProvider
      Retruns one or more service details that the service exposes.
      Specified by:
      getServicesMonitors in interface ServiceMonitorsProvider
    • getServicesDetails

      public ServiceDetails[] getServicesDetails()
      Description copied from interface: ServiceDetailsProvider
      Retruns one or more service details that the service exposes.
      Specified by:
      getServicesDetails in interface ServiceDetailsProvider
    • getDBOptions

      protected XAPDBOptions getDBOptions()
    • getDataColumnFamilyOptions

      protected XAPColumnFamilyOptions getDataColumnFamilyOptions()
    • getMappingDir

      protected String getMappingDir()
    • isCentralStorage

      protected boolean isCentralStorage()