|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.oracle.coherence.patterns.command.internal.ContextWrapper
public class ContextWrapper
A ContextWrapper is used to wrap and provide internal
execution information about an individual Context, including
how to identify the Context, the cluster member on which
the Context was originally created and the Ticket of
the last successfully executed Command (so we can know where
to recover from in case of fail-over, load-balancing or restart.
Copyright (c) 2008. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
| Field Summary | |
|---|---|
static String |
CACHENAME
The Coherence cache in which ContextWrappers will be placed. |
| Constructor Summary | |
|---|---|
ContextWrapper()
Required for ExternalizableLite. |
|
ContextWrapper(Identifier contextIdentifier,
Context context,
ContextConfiguration contextConfiguration)
Standard Constructor. |
|
| Method Summary | |
|---|---|
Identifier |
getContentIdentifier()
Returns the unique Identifier that is used to represent the Context. |
Context |
getContext()
Return the Context being wrapped (ie: managed). |
ContextConfiguration |
getContextConfiguration()
Returns the ContextConfiguration for the Context being wrapped. |
long |
getContextVersion()
Return the current version number of the ContextWrapper. |
Ticket |
getLastExecutedTicket()
Returns the Ticket of the last successfully executed Command
for the Context. |
long |
getTotalCommandExecutionDuration()
Returns the total time (in milliseconds) that the Commands executed thus far have taken to execute. |
long |
getTotalCommandExecutionWaitingDuration()
Returns the total time (in milliseconds) that the Commands executed thus far have waited to execute (ie: the queuing time). |
long |
getTotalCommandsExecuted()
Returns the total number of Commands that have been executed
for the Context. |
long |
nextVersion()
Increments, stores and returns the next version of the Context. |
void |
readExternal(DataInput in)
|
void |
readExternal(com.tangosol.io.pof.PofReader reader)
|
void |
setContext(Context context)
Replace the Context being wrapped (ie: managed). |
String |
toString()
|
void |
updateExecutionInformation(Ticket ticket,
long executionDuration,
long waitingDuration)
Updates the execution information for the Context
tracked by the ContextWrapper after a Command
has been executed. |
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 |
| Field Detail |
|---|
public static final String CACHENAME
ContextWrappers will be placed.
| Constructor Detail |
|---|
public ContextWrapper()
ExternalizableLite.
public ContextWrapper(Identifier contextIdentifier,
Context context,
ContextConfiguration contextConfiguration)
DefaultContextsManager
class when creating Contexts.
contextIdentifier - context - | Method Detail |
|---|
public Identifier getContentIdentifier()
Identifier that is used to represent the Context.
public Context getContext()
Context being wrapped (ie: managed).
public void setContext(Context context)
Context being wrapped (ie: managed).
public ContextConfiguration getContextConfiguration()
ContextConfiguration for the Context being wrapped.
public long getContextVersion()
ContextWrapper.
public long nextVersion()
Context.
public Ticket getLastExecutedTicket()
Ticket of the last successfully executed Command
for the Context.
public long getTotalCommandsExecuted()
Commands that have been executed
for the Context.
public long getTotalCommandExecutionDuration()
Commands executed thus far have taken to execute.
public long getTotalCommandExecutionWaitingDuration()
Commands executed thus far have waited to execute (ie: the queuing time).
public void updateExecutionInformation(Ticket ticket,
long executionDuration,
long waitingDuration)
Context
tracked by the ContextWrapper after a Command
has been executed.
ticket - executionDuration - waitingDuration -
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 String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||