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, weakCompareAndSetbyteValue, shortValuepublic EvictableLockObject(String uid)
public EvictableLockObject(String uid, boolean evictionIndicator)
public String getUID()
getUID in interface IEvictableLockObjectpublic boolean isLockSubject()
isLockSubject in interface ILockObjectpublic boolean isEvictionPermissionIndicator()
isEvictionPermissionIndicator in interface IEvictableLockObjectpublic int getNumOfUsers()
getNumOfUsers in interface IEvictableLockObjectpublic boolean incrementNumOfUsersIfNotEmpty()
incrementNumOfUsersIfNotEmpty in interface IEvictableLockObjectpublic boolean decrementNumOfUsersAndIndicateEmpty()
decrementNumOfUsersAndIndicateEmpty in interface IEvictableLockObjectpublic int getNumOfUsersAndEmpty()
getNumOfUsersAndEmpty in interface IEvictableLockObjectpublic IEvictableLockObject getEvictableLockObject()
Copyright © GigaSpaces.