org.jgroups.protocols
Class COUNTER.VersionedValue

java.lang.Object
  extended by org.jgroups.protocols.COUNTER.VersionedValue
Enclosing class:
COUNTER

protected static class COUNTER.VersionedValue
extends java.lang.Object


Field Summary
protected  long value
           
protected  long version
           
 
Constructor Summary
protected COUNTER.VersionedValue(long value)
           
protected COUNTER.VersionedValue(long value, long version)
           
 
Method Summary
protected  long[] addAndGet(long num)
          num == 0 --> GET
protected  long[] compareAndSet(long expected, long update)
           
protected  long[] set(long value)
           
 java.lang.String toString()
           
protected  void updateIfBigger(long value, long version)
          Sets the value only if the version argument is greater than the own version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected long value

version

protected long version
Constructor Detail

COUNTER.VersionedValue

protected COUNTER.VersionedValue(long value)

COUNTER.VersionedValue

protected COUNTER.VersionedValue(long value,
                                 long version)
Method Detail

addAndGet

protected long[] addAndGet(long num)
num == 0 --> GET


set

protected long[] set(long value)

compareAndSet

protected long[] compareAndSet(long expected,
                               long update)

updateIfBigger

protected void updateIfBigger(long value,
                              long version)
Sets the value only if the version argument is greater than the own version


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.