public abstract class CacheableCommandImpl extends TargetableCommandImpl implements CacheableCommand, com.ibm.websphere.cache.Sizeable
CacheableCommandImpl is a super class of all CacheableCommands.
LOCAL
serialVersionUID
Constructor and Description |
---|
CacheableCommandImpl() |
Modifier and Type | Method and Description |
---|---|
void |
execute()
This implements the method in the Command interface, overriding
the implementation in TargetableCommandImpl.
|
boolean |
executeFromCache()
executeFromCache This method will check the cache to see if the
given command is present.
|
CommandCaller |
getCaller()
Implements the CacheableCommand interface method.
|
com.ibm.websphere.cache.EntryInfo |
getEntryInfo()
The gets this command's EntryInfo object, which holds its caching
metadata.
|
java.lang.String |
getId()
This is the method in the CacheableCommand interface.
|
long |
getObjectSize() |
int |
getSharingPolicy()
This is the method in the CacheableCommand interface.
|
void |
postExecute()
Implements the CacheableCommand interface.
|
boolean |
preExecute()
This implements the CacheableCommand interface.
|
void |
reset()
Reset the command for reuse.
|
void |
setCaller(CommandCaller caller)
Implements the CacheableCommand interface method.
|
void |
setObjectSize(long objectSize) |
void |
unionDependencies(com.ibm.websphere.cache.EntryInfo entryInfo)
This is called by the CommandCache to add dependencies to this command.
|
void |
updateCache()
This method will cause the current command to be placed into the cache.
|
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, isReadyToCallExecute, performExecute, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCommandTarget, getCommandTargetName, hasOutputProperties, performExecute, setCommandTarget, setCommandTargetName, setOutputProperties
isReadyToCallExecute
public final java.lang.String getId()
getId
in interface CacheableCommand
public final int getSharingPolicy()
getSharingPolicy
in interface CacheableCommand
public boolean preExecute()
preExecute
in interface CacheableCommand
public void postExecute()
postExecute
in interface CacheableCommand
public void execute() throws CommandException
It does the following:
execute
in interface Command
execute
in class TargetableCommandImpl
CommandException
- The superclass for all command exceptions.public void setCaller(CommandCaller caller)
setCaller
in interface CacheableCommand
caller
- The command that called this command.public CommandCaller getCaller()
getCaller
in interface CacheableCommand
public void unionDependencies(com.ibm.websphere.cache.EntryInfo entryInfo)
unionDependencies
in interface CommandCaller
entryInfo
- This command's entryInfo.public com.ibm.websphere.cache.EntryInfo getEntryInfo()
getEntryInfo
in interface CacheableCommand
public void reset()
reset
in interface Command
reset
in class TargetableCommandImpl
public boolean executeFromCache() throws CommandException
executeFromCache
in interface CacheableCommand
CommandException
public void updateCache()
updateCache
in interface CacheableCommand
public long getObjectSize()
getObjectSize
in interface com.ibm.websphere.cache.Sizeable
public void setObjectSize(long objectSize)