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

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

Deprecated. will be removed when pessimistic locking is removed.

@Deprecated
public class CreateNodeCommand
extends AbstractDataCommand
implements WriteCommand, ReversibleCommand

Command that creates a node. Primarily to be used as an undo command for removing nodes.

Since:
2.2.0
Author:
Manik Surtani (manik AT jboss DOT org)

Field Summary
static int METHOD_ID
          Deprecated.  
protected  List<Fqn> newlyCreated
          Deprecated.  
 
Fields inherited from class org.jboss.cache.commands.read.AbstractDataCommand
dataContainer, fqn
 
Constructor Summary
CreateNodeCommand()
          Deprecated.  
CreateNodeCommand(Fqn fqn)
          Deprecated.  
 
Method Summary
 Object acceptVisitor(InvocationContext ctx, Visitor visitor)
          Deprecated. Accept a visitor, and return the result of accepting this visitor.
 int getCommandId()
          Deprecated. Used by marshallers to convert this command into an id for streaming.
 GlobalTransaction getGlobalTransaction()
          Deprecated.  
 Object perform(InvocationContext ctx)
          Deprecated. Creates a node in the cache, specified by the given Fqn.
 void rollback()
          Deprecated. Reverses a command that has already been invoked.
 void setGlobalTransaction(GlobalTransaction gtx)
          Deprecated. Sets a GlobalTransaction on this command.
 String toString()
          Deprecated.  
 
Methods inherited from class org.jboss.cache.commands.read.AbstractDataCommand
equals, getFqn, getParameters, hashCode, initialize, setParameters
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

METHOD_ID

public static final int METHOD_ID
Deprecated. 
See Also:
Constant Field Values

newlyCreated

protected final List<Fqn> newlyCreated
Deprecated. 
Constructor Detail

CreateNodeCommand

public CreateNodeCommand(Fqn fqn)
Deprecated. 

CreateNodeCommand

public CreateNodeCommand()
Deprecated. 
Method Detail

getCommandId

public int getCommandId()
Deprecated. 
Description copied from interface: ReplicableCommand
Used by marshallers to convert this command into an id for streaming.

Specified by:
getCommandId in interface ReplicableCommand
Returns:
the method id of this command. This is compatible with pre-2.2.0 MethodCall ids.

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

getGlobalTransaction

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

perform

public Object perform(InvocationContext ctx)
Deprecated. 
Creates a node in the cache, specified by the given Fqn.

Specified by:
perform in interface ReplicableCommand
Parameters:
ctx - invocation context
Returns:
arbitrary return value generated by performing this command

rollback

public void rollback()
Deprecated. 
Description copied from interface: ReversibleCommand
Reverses a command that has already been invoked.

Important: this method will be invoked at the end of interceptors chain. It should never be called directly from a custom interceptor.

Specified by:
rollback in interface ReversibleCommand

acceptVisitor

public Object acceptVisitor(InvocationContext ctx,
                            Visitor visitor)
                     throws Throwable
Deprecated. 
Description copied from interface: VisitableCommand
Accept a visitor, and return the result of accepting this visitor.

Specified by:
acceptVisitor in interface VisitableCommand
Parameters:
ctx - invocation context
visitor - visitor to accept
Returns:
arbitrary return value
Throws:
Throwable - in the event of problems

toString

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


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