com.oracle.coherence.patterns.command.internal
Class ClaimContextProcessor

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.processor.AbstractProcessor
          extended by com.oracle.coherence.patterns.command.internal.ClaimContextProcessor
All Implemented Interfaces:
com.tangosol.io.ExternalizableLite, com.tangosol.io.pof.PortableObject, com.tangosol.util.InvocableMap.EntryProcessor, Serializable

public class ClaimContextProcessor
extends com.tangosol.util.processor.AbstractProcessor
implements com.tangosol.io.ExternalizableLite, com.tangosol.io.pof.PortableObject

The ClaimContextProcessor is responsible for "claiming" a Context for execution with a CommandExecutor.

This enables us to determine during CommandExecutionRequest execute if another thread, possibly on another Member, has also claimed the said ContextWrapper. In turn this allows us to fail-fast, and stop processing on the original CommandExecutor thread to avoid where possible, multiple execution of a Command.

Copyright (c) 2008. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.

Author:
Brian Oliver
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.tangosol.util.Base
com.tangosol.util.Base.CommonMonitor, com.tangosol.util.Base.LoggingWriter, com.tangosol.util.Base.StackFrame
 
Field Summary
 
Fields inherited from class com.tangosol.util.Base
LOG_ALWAYS, LOG_DEBUG, LOG_ERR, LOG_INFO, LOG_MAX, LOG_MIN, LOG_QUIET, LOG_WARN, POWER_0, POWER_G, POWER_K, POWER_M, POWER_T, UNIT_D, UNIT_H, UNIT_M, UNIT_MS, UNIT_NS, UNIT_S, UNIT_US
 
Constructor Summary
ClaimContextProcessor()
          Required for ExternalizableLite and PortableObject
ClaimContextProcessor(com.tangosol.util.UID memberUID)
          Standard Constructor.
 
Method Summary
 Object process(com.tangosol.util.InvocableMap.Entry entry)
          
 void readExternal(DataInput in)
          
 void readExternal(com.tangosol.io.pof.PofReader reader)
          
 void writeExternal(DataOutput out)
          
 void writeExternal(com.tangosol.io.pof.PofWriter writer)
          
 
Methods inherited from class com.tangosol.util.processor.AbstractProcessor
processAll
 
Methods inherited from class com.tangosol.util.Base
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getRandom, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, read, read, read, read, read, read, read, redirectAll, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClaimContextProcessor

public ClaimContextProcessor()
Required for ExternalizableLite and PortableObject


ClaimContextProcessor

public ClaimContextProcessor(com.tangosol.util.UID memberUID)
Standard Constructor.

Parameters:
memberUID - The UID of the Member on which we should be claiming the Context.
Method Detail

process

public Object process(com.tangosol.util.InvocableMap.Entry entry)

Specified by:
process in interface com.tangosol.util.InvocableMap.EntryProcessor

readExternal

public void readExternal(DataInput in)
                  throws IOException

Specified by:
readExternal in interface com.tangosol.io.ExternalizableLite
Throws:
IOException

writeExternal

public void writeExternal(DataOutput out)
                   throws IOException

Specified by:
writeExternal in interface com.tangosol.io.ExternalizableLite
Throws:
IOException

readExternal

public void readExternal(com.tangosol.io.pof.PofReader reader)
                  throws IOException

Specified by:
readExternal in interface com.tangosol.io.pof.PortableObject
Throws:
IOException

writeExternal

public void writeExternal(com.tangosol.io.pof.PofWriter writer)
                   throws IOException

Specified by:
writeExternal in interface com.tangosol.io.pof.PortableObject
Throws:
IOException


Copyright © 2016. All rights reserved.