public class EvictableLockObject extends AtomicInteger implements IEvictableLockObject
Constructor and Description |
---|
EvictableLockObject(String uid) |
EvictableLockObject(String uid,
boolean evictionIndicator) |
Modifier and Type | Method and Description |
---|---|
boolean |
decrementNumOfUsersAndIndicateEmpty()
decrement the number of users using (i.e locking + waiting + finished & not released yet) of
the lock object
|
IEvictableLockObject |
getEvictableLockObject()
if the lock object is an evictable lock object, return the interface (preferable to casing)
|
int |
getNumOfUsers()
get the number of users using (i.e locking + waiting + finished & not released yet) of the
lock object
|
int |
getNumOfUsersAndEmpty()
atomicly get & reset the number of users of the lock object
|
String |
getUID()
get the uid for the object to lock
|
boolean |
incrementNumOfUsersIfNotEmpty()
increment the number of users using (i.e locking + waiting + finished & not released yet) of
the lock object, if the lock object is not empty (zero users)
|
boolean |
isEvictionPermissionIndicator()
true if this object is an eviction indicator.
|
boolean |
isLockSubject()
returns true if the lock object is the subject itself (i.e.
|
accumulateAndGet, addAndGet, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, incrementAndGet, intValue, lazySet, longValue, set, toString, updateAndGet, weakCompareAndSet
byteValue, shortValue
public EvictableLockObject(String uid)
public EvictableLockObject(String uid, boolean evictionIndicator)
public String getUID()
getUID
in interface IEvictableLockObject
public boolean isLockSubject()
isLockSubject
in interface ILockObject
public boolean isEvictionPermissionIndicator()
isEvictionPermissionIndicator
in interface IEvictableLockObject
public int getNumOfUsers()
getNumOfUsers
in interface IEvictableLockObject
public boolean incrementNumOfUsersIfNotEmpty()
incrementNumOfUsersIfNotEmpty
in interface IEvictableLockObject
public boolean decrementNumOfUsersAndIndicateEmpty()
decrementNumOfUsersAndIndicateEmpty
in interface IEvictableLockObject
public int getNumOfUsersAndEmpty()
getNumOfUsersAndEmpty
in interface IEvictableLockObject
public IEvictableLockObject getEvictableLockObject()
Copyright © GigaSpaces.