org.terracotta.modules.ehcache.writebehind.operations
Class WriteAsyncOperation

java.lang.Object
  extended by org.terracotta.modules.ehcache.writebehind.operations.WriteAsyncOperation
All Implemented Interfaces:
Serializable, SingleAsyncOperation

public class WriteAsyncOperation
extends Object
implements SingleAsyncOperation

See Also:
Serialized Form

Constructor Summary
WriteAsyncOperation(Element snapshot)
           
 
Method Summary
 long getCreationTime()
          Retrieves the moment when the operation was created.
 Element getElement()
           
 Object getKey()
          Retrieves the key for this operation.
 void performSingleOperation(CacheWriter cacheWriter)
          Perform this operation as a single execution with the provided cache writer
 void throwAwayElement(CacheWriter cacheWriter, RuntimeException e)
          This method will be called to throw the item away.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriteAsyncOperation

public WriteAsyncOperation(Element snapshot)
Method Detail

getElement

public Element getElement()
Specified by:
getElement in interface SingleAsyncOperation

performSingleOperation

public void performSingleOperation(CacheWriter cacheWriter)
Description copied from interface: SingleAsyncOperation
Perform this operation as a single execution with the provided cache writer

Specified by:
performSingleOperation in interface SingleAsyncOperation
Parameters:
cacheWriter - the cache writer this operation should be performed upon

getKey

public Object getKey()
Description copied from interface: SingleAsyncOperation
Retrieves the key for this operation.

Specified by:
getKey in interface SingleAsyncOperation
Returns:
this operation's key

getCreationTime

public long getCreationTime()
Description copied from interface: SingleAsyncOperation
Retrieves the moment when the operation was created.

Specified by:
getCreationTime in interface SingleAsyncOperation
Returns:
the creation time in milliseconds

throwAwayElement

public void throwAwayElement(CacheWriter cacheWriter,
                             RuntimeException e)
Description copied from interface: SingleAsyncOperation
This method will be called to throw the item away.

Specified by:
throwAwayElement in interface SingleAsyncOperation


Copyright © 2003-2013 Terracotta, Inc.. All Rights Reserved.