org.jboss.cache.commands.legacy.write
Class VersionedInvalidateCommand

java.lang.Object
  extended by org.jboss.cache.commands.read.AbstractDataCommand
      extended by org.jboss.cache.commands.write.InvalidateCommand
          extended by org.jboss.cache.commands.legacy.write.VersionedInvalidateCommand
All Implemented Interfaces:
DataCommand, ReplicableCommand, VersionedDataCommand, VisitableCommand, WriteCommand

Deprecated. will be removed along with optimistic and pessimistic locking.

@Deprecated
public class VersionedInvalidateCommand
extends InvalidateCommand
implements VersionedDataCommand

Behaves like InvalidateCommand. Also, potentially throws a cache exception if data versioning is used and the node in memory has a newer data version than what is passed in.

Finally, the data version of the in-memory node is updated to the version being evicted to prevent versions going out of sync.

Since:
2.2
Author:
Mircea.Markus@jboss.com

Field Summary
protected  GlobalTransaction globalTransaction
          Deprecated. Params.
 
Fields inherited from class org.jboss.cache.commands.write.InvalidateCommand
METHOD_ID, notifier, spi
 
Fields inherited from class org.jboss.cache.commands.read.AbstractDataCommand
dataContainer, fqn
 
Constructor Summary
VersionedInvalidateCommand()
          Deprecated.  
VersionedInvalidateCommand(Fqn fqn)
          Deprecated.  
 
Method Summary
protected  void createTombstone(InvocationContext ctx)
          Deprecated.  
 DataVersion getDataVersion()
          Deprecated.  
 GlobalTransaction getGlobalTransaction()
          Deprecated.  
 Object[] getParameters()
          Deprecated. Basic versions of these methods
 void initialize(TransactionManager txManager)
          Deprecated.  
 boolean isVersioned()
          Deprecated. Has data version set? (i.e.
 Object perform(InvocationContext ctx)
          Deprecated. Performs an invalidation on a specified node
protected  void removeData(NodeSPI n, InvocationContext ctx)
          Deprecated.  
 void setDataVersion(DataVersion dataVersion)
          Deprecated. Sets the DataVersion pertaining to this command.
 void setGlobalTransaction(GlobalTransaction gtx)
          Deprecated. Sets a GlobalTransaction on this command.
 void setParameters(int commandId, Object[] args)
          Deprecated. Basic versions of these methods
 String toString()
          Deprecated.  
 
Methods inherited from class org.jboss.cache.commands.write.InvalidateCommand
acceptVisitor, enforceNodeLoading, getCommandId, initialize, invalidateNode
 
Methods inherited from class org.jboss.cache.commands.read.AbstractDataCommand
equals, getFqn, hashCode, initialize
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.cache.commands.DataCommand
getFqn
 
Methods inherited from interface org.jboss.cache.commands.VisitableCommand
acceptVisitor
 
Methods inherited from interface org.jboss.cache.commands.ReplicableCommand
getCommandId
 

Field Detail

globalTransaction

protected GlobalTransaction globalTransaction
Deprecated. 
Params.

Constructor Detail

VersionedInvalidateCommand

public VersionedInvalidateCommand(Fqn fqn)
Deprecated. 

VersionedInvalidateCommand

public VersionedInvalidateCommand()
Deprecated. 
Method Detail

initialize

public void initialize(TransactionManager txManager)
Deprecated. 

perform

public Object perform(InvocationContext ctx)
Deprecated. 
Description copied from class: InvalidateCommand
Performs an invalidation on a specified node

Specified by:
perform in interface ReplicableCommand
Overrides:
perform in class InvalidateCommand
Parameters:
ctx - invocation context
Returns:
null

createTombstone

protected void createTombstone(InvocationContext ctx)
Deprecated. 

removeData

protected void removeData(NodeSPI n,
                          InvocationContext ctx)
                   throws CacheException
Deprecated. 
Throws:
CacheException

getDataVersion

public DataVersion getDataVersion()
Deprecated. 
Specified by:
getDataVersion in interface VersionedDataCommand
Returns:
the DataVersion pertaining to this command.

setDataVersion

public void setDataVersion(DataVersion dataVersion)
Deprecated. 
Description copied from interface: VersionedDataCommand
Sets the DataVersion pertaining to this command.

Specified by:
setDataVersion in interface VersionedDataCommand
Parameters:
dataVersion - to set

getGlobalTransaction

public GlobalTransaction getGlobalTransaction()
Deprecated. 
Specified by:
getGlobalTransaction in interface WriteCommand
Returns:
a GlobalTransaction associated with this command.

setGlobalTransaction

public void setGlobalTransaction(GlobalTransaction gtx)
Deprecated. 
Description copied from interface: WriteCommand
Sets a GlobalTransaction on this command.

Specified by:
setGlobalTransaction in interface WriteCommand
Parameters:
gtx - global transaction to set

isVersioned

public boolean isVersioned()
Deprecated. 
Description copied from interface: VersionedDataCommand
Has data version set? (i.e. not null)

Specified by:
isVersioned in interface VersionedDataCommand
Returns:
true if getDataVersion() would not return null; false otherwise.

toString

public String toString()
Deprecated. 
Overrides:
toString in class InvalidateCommand

getParameters

public Object[] getParameters()
Deprecated. 
Description copied from class: AbstractDataCommand
Basic versions of these methods

Specified by:
getParameters in interface ReplicableCommand
Overrides:
getParameters in class InvalidateCommand
Returns:
an object array of arguments, compatible with pre-2.2.0 MethodCall args.

setParameters

public void setParameters(int commandId,
                          Object[] args)
Deprecated. 
Description copied from class: AbstractDataCommand
Basic versions of these methods

Specified by:
setParameters in interface ReplicableCommand
Overrides:
setParameters in class InvalidateCommand
Parameters:
commandId - command id to set. This is usually unused but *could* be used in the event of a command having multiple IDs, such as PutKeyValueCommand.
args - object array of args


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.