Class OffHeapBlobStoreHandler

java.lang.Object
com.gigaspaces.server.blobstore.BlobStoreStorageHandler
com.gigaspaces.blobstore.offheap.OffHeapBlobStoreHandler
All Implemented Interfaces:
OffHeapStorageContainer, ServiceDetailsProvider

public class OffHeapBlobStoreHandler extends BlobStoreStorageHandler implements OffHeapStorageContainer, ServiceDetailsProvider
Since:
12.3
Author:
Yael Nahon
  • Constructor Details

    • OffHeapBlobStoreHandler

      public OffHeapBlobStoreHandler(long memoryThreshold)
  • Method Details

    • 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
    • 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
    • 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.
    • getStatistics

      public BlobStoreStorageStatistics getStatistics()
      Overrides:
      getStatistics in class BlobStoreStorageHandler
    • 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.
    • getMemoryPool

      public AbstractMemoryPool getMemoryPool()
      Specified by:
      getMemoryPool in interface OffHeapStorageContainer
    • 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