Top Description Constructors Methods
net.sf.ehcache.transaction.xa.commands

public Class StorePutCommand

extends AbstractStoreCommand
Class Inheritance
Imports
net.sf.ehcache.Element

Represents a net.sf.ehcache.store.Store#put(net.sf.ehcache.Element) put} operation to be executed on a net.sf.ehcache.store.Store.
Author
Alex Snaps

Constructor Summary

AccessConstructor and Description
public
StorePutCommand(final Element
the element in the underlying store at the time this command is created
oldElement
,
final Element
the new element to put in the underlying store
newElement
)

Create a StorePutCommand

Method Summary

Modifier and TypeMethod and Description
public Element

Returns:

the element instance
getElement
()

Getter to the Element instance to be put in the Store

public Object
getObjectKey()

Implements net.sf.ehcache.transaction.xa.commands.Command.getObjectKey.

Get the key of the element this command is working on
public boolean
isPut(Object
the key
key
)

Implements net.sf.ehcache.transaction.xa.commands.Command.isPut.

Is this command represents adding a key to the store
public boolean
isRemove(Object
the key
key
)

Implements net.sf.ehcache.transaction.xa.commands.Command.isRemove.

Is this command represents removing a key to the store
Inherited from net.sf.ehcache.transaction.xa.commands.AbstractStoreCommand:
getNewElementgetOldElementpreparerollback

Constructor Detail

StorePutCommandback to summary
public StorePutCommand(final Element oldElement, final Element newElement)

Create a StorePutCommand

Parameters
oldElement:Element

the element in the underlying store at the time this command is created

newElement:Element

the new element to put in the underlying store

Method Detail

getElementback to summary
public Element getElement()

Getter to the Element instance to be put in the Store

Returns:Element

the element instance

getObjectKeyback to summary
public Object getObjectKey()

Implements net.sf.ehcache.transaction.xa.commands.Command.getObjectKey.

Doc from net.sf.ehcache.transaction.xa.commands.Command.getObjectKey.

Get the key of the element this command is working on

Returns:Object

the element's key

isPutback to summary
public boolean isPut(Object key)

Implements net.sf.ehcache.transaction.xa.commands.Command.isPut.

Doc from net.sf.ehcache.transaction.xa.commands.Command.isPut.

Is this command represents adding a key to the store

Parameters
key:Object

the key

Returns:boolean

true, if this command would try to add an Element for key, otherwise false

isRemoveback to summary
public boolean isRemove(Object key)

Implements net.sf.ehcache.transaction.xa.commands.Command.isRemove.

Doc from net.sf.ehcache.transaction.xa.commands.Command.isRemove.

Is this command represents removing a key to the store

Parameters
key:Object

the key

Returns:boolean

true, if this command would try to remove an Element for key, otherwise false