|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.oracle.coherence.patterns.command.internal.CommandExecutionRequest
public class CommandExecutionRequest
A CommandExecutionRequest represents a request to execute
a Command with in a specified Context (by a
CommandExecutor).
Along with the Command, a CommandExecutionRequest also
contains meta-data about the execution request, including
the globally unique Identifier of the request and the
issued Ticket (by the CommandExecutor)
for the purposes of ordering the Command execution
on a first-come-first-served (FIFO) basis.
To have a Command executed, you should use the
CommandSubmitter.submitCommand(Identifier, Command)
method.
Copyright (c) 2008. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Command,
Context,
CommandExecutor,
Serialized Form| Nested Class Summary | |
|---|---|
static class |
CommandExecutionRequest.Key
A custom key implementation for the CommandExecutionRequest class
to support KeyAssociation. |
static class |
CommandExecutionRequest.Status
The request can be in one of three states: Pending, Started, or Canceled |
| Constructor Summary | |
|---|---|
CommandExecutionRequest()
For ExternalizableLite and PortableObject. |
|
CommandExecutionRequest(Identifier contextIdentifier,
Command<?> command)
Standard Constructor. |
|
| Method Summary | |
|---|---|
int |
compareTo(CommandExecutionRequest other)
|
static String |
getCacheName(ContextConfiguration.ManagementStrategy managementStrategy)
Returns the NamedCache for the CommandExecutionRequest
using the specified ContextConfiguration.ManagementStrategy. |
Object |
getCheckpoint()
Returns the current checkpoint for the Command. |
Command<?> |
getCommand()
Returns the Command associated with the CommandExecutionRequest. |
Identifier |
getContextIdentifier()
Returns the Identifier of the Context in which the
CommandExecutionRequest Command
will be executed. |
long |
getInstantQueued()
Return the time (in milliseconds) since the EPOC when the CommandExecutionRequest was queued for execution. |
CommandExecutionRequest.Status |
getStatus()
Return the current CommandExecutionRequest.Status of this request. |
Ticket |
getTicket()
Returns the Ticket for the CommandExecutionRequest. |
boolean |
isCanceled()
Returns if the CommandExecutionRequest has been canceled
and thus should not be executed (if it hasn't already been executed or hasn't started being executed). |
void |
readExternal(DataInput in)
|
void |
readExternal(com.tangosol.io.pof.PofReader reader)
|
void |
setCheckpoint(Object checkpoint)
Sets the current checkpoint for the Command. |
void |
setInstantQueued(long instantQueued)
Sets the time (in milliseconds) since the EPOC when the CommandExecutionRequest was queued for execution. |
void |
setStatus(CommandExecutionRequest.Status status)
Set the CommandExecutionRequest.Status for this request. |
void |
setTicket(Ticket ticket)
Sets the Ticket for the CommandExecutionRequest. |
String |
toString()
|
void |
writeExternal(DataOutput out)
|
void |
writeExternal(com.tangosol.io.pof.PofWriter writer)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CommandExecutionRequest()
ExternalizableLite and PortableObject.
public CommandExecutionRequest(Identifier contextIdentifier,
Command<?> command)
contextIdentifier - command - | Method Detail |
|---|
public Identifier getContextIdentifier()
Identifier of the Context in which the
CommandExecutionRequest Command
will be executed.
public Ticket getTicket()
Ticket for the CommandExecutionRequest.
The Ticket is used to determine the order in which the
CommandExecutionRequest Command will be executed in the
Context.
public void setTicket(Ticket ticket)
Ticket for the CommandExecutionRequest.
ticket - public Command<?> getCommand()
Command associated with the CommandExecutionRequest.
public long getInstantQueued()
CommandExecutionRequest was queued for execution.
public void setInstantQueued(long instantQueued)
CommandExecutionRequest was queued for execution.
public CommandExecutionRequest.Status getStatus()
CommandExecutionRequest.Status of this request.
CommandExecutionRequest.Status of this requestpublic void setStatus(CommandExecutionRequest.Status status)
CommandExecutionRequest.Status for this request.
status - the CommandExecutionRequest.Status for this requestpublic boolean isCanceled()
CommandExecutionRequest has been canceled
and thus should not be executed (if it hasn't already been executed or hasn't started being executed).
public Object getCheckpoint()
Command.
public void setCheckpoint(Object checkpoint)
Command.
checkpoint -
public void readExternal(DataInput in)
throws IOException
readExternal in interface com.tangosol.io.ExternalizableLiteIOException
public void writeExternal(DataOutput out)
throws IOException
writeExternal in interface com.tangosol.io.ExternalizableLiteIOException
public void readExternal(com.tangosol.io.pof.PofReader reader)
throws IOException
readExternal in interface com.tangosol.io.pof.PortableObjectIOException
public void writeExternal(com.tangosol.io.pof.PofWriter writer)
throws IOException
writeExternal in interface com.tangosol.io.pof.PortableObjectIOExceptionpublic int compareTo(CommandExecutionRequest other)
compareTo in interface Comparable<CommandExecutionRequest>public String toString()
toString in class Objectpublic static String getCacheName(ContextConfiguration.ManagementStrategy managementStrategy)
NamedCache for the CommandExecutionRequest
using the specified ContextConfiguration.ManagementStrategy.
managementStrategy -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||