ehcache

net.sf.ehcache.transaction
Class StoreRemoveCommand

java.lang.Object
  extended by net.sf.ehcache.transaction.StoreRemoveCommand
All Implemented Interfaces:
Command, StoreWriteCommand
Direct Known Subclasses:
StoreRemoveWithWriterCommand

public class StoreRemoveCommand
extends java.lang.Object
implements StoreWriteCommand

Represents a remove operation to be executed on a Store.

Author:
Alex Snaps

Field Summary
 
Fields inherited from interface net.sf.ehcache.transaction.Command
EXPIRE_ALL_ELEMENTS, NULL, PUT, PUT_WITH_WRITER, REMOVE, REMOVE_ALL, REMOVE_WITH_WRITER
 
Constructor Summary
StoreRemoveCommand(CacheEntry entry)
          Constructs a remove command for a cache entry
 
Method Summary
 boolean execute(CacheWriterManager cacheWriterManager)
          Executes the command on some cacheWriterManager
 boolean execute(Store store)
          Executes the command on some store
 java.lang.String getCommandName()
          
 CacheEntry getEntry()
          Getter to the cache entry to be removed
 java.lang.Object getKey()
          Getter to the key to be removed
 boolean isPut(java.lang.Object key)
          Is this command represents adding a key to the store
 boolean isRemove(java.lang.Object key)
          Is this command represents removing a key to the store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoreRemoveCommand

public StoreRemoveCommand(CacheEntry entry)
Constructs a remove command for a cache entry

Parameters:
entry - to remove from the store on StorePutCommand.execute(net.sf.ehcache.store.Store)
Method Detail

execute

public boolean execute(Store store)
Executes the command on some store

Specified by:
execute in interface Command
Parameters:
store - the Store on which to execute the command
Returns:
true if the store was mutated, false otherwise

execute

public boolean execute(CacheWriterManager cacheWriterManager)
Executes the command on some cacheWriterManager

Specified by:
execute in interface Command
Parameters:
cacheWriterManager - the CacheWriterManager on which to execute the command
Returns:
true if the CacheWriterManager was called

isPut

public boolean isPut(java.lang.Object key)
Is this command represents adding a key to the store

Specified by:
isPut in interface Command
Parameters:
key - the key
Returns:
true, if this command would try to add an Element for key, otherwise false

isRemove

public boolean isRemove(java.lang.Object key)
Is this command represents removing a key to the store

Specified by:
isRemove in interface Command
Parameters:
key - the key
Returns:
true, if this command would try to remove an Element for key, otherwise false

getCommandName

public java.lang.String getCommandName()

Specified by:
getCommandName in interface Command
Returns:
the command name

getKey

public java.lang.Object getKey()
Getter to the key to be removed

Returns:
the key

getEntry

public CacheEntry getEntry()
Getter to the cache entry to be removed

Returns:
the cache entry

ehcache

true