Class WriteOperation


  • public class WriteOperation
    extends WriteOperationBase
    WriteOperation is used with DSWriteOperation to get an operation to perform on cache.
    • Constructor Detail

      • WriteOperation

        public WriteOperation()
      • WriteOperation

        public WriteOperation​(java.lang.String key,
                              ProviderCacheItem cacheItem,
                              WriteOperationType opType,
                              int retryCount)
        WriteOperation constructor which takes key, ProviderCache WriteOperationType and retries count.
        Parameters:
        key - Key of an item on which operation has to be performed.
        cacheItem - ProviderCacheItem that contains the object on which operation is need to be performed.
        opType - WriteOperationType that contains the type of the Operation that is need to be performed.
        retryCount - RetryCount is a count for how many times the retries are need to be performed for the FailureRetry items.
    • Method Detail

      • getProviderCacheItem

        public final ProviderCacheItem getProviderCacheItem()
        Gets the ProviderCacheItem associated with the WriteOperation.
        Returns:
        The ProviderCacheItem associated with the WriteOperation.
      • setProviderCacheItem

        public final void setProviderCacheItem​(ProviderCacheItem value)
        Sets the ProviderCacheItem associated with the WriteOperation.
        Parameters:
        value - The ProviderCacheItem to be associated with the WriteOperation.
      • getOperationType

        public final WriteOperationType getOperationType()
        Gets the type of Write operation.
        Returns:
        The type of the write operation.
      • setRetryCount

        public void setRetryCount​(int retryCount)
      • setKey

        public final void setKey​(java.lang.String Key)
        Description copied from class: WriteOperationBase
        Sets the key on which operation has been performed.
        Overrides:
        setKey in class WriteOperationBase
        Parameters:
        Key - The key as string.
      • getKey

        public final java.lang.String getKey()
        Description copied from class: WriteOperationBase
        Gets the key on which operation has been performed.
        Overrides:
        getKey in class WriteOperationBase
        Returns:
        The key as string.