public abstract class LockOptions extends java.lang.Object implements SpaceOptions<LockOptions>
SpaceOptions
and is used
as a parameter to the following methods of Space
:
LockOptions can be used to specify a ResultHandler object or closure object when
asynchronously setting a lock on a tuple, or collection of tuples, in a space. LockOptions is
also used to specify the amount of time to wait for a lock to clear, if an entry is
already locked.
LockOptions is an abstract class. To create an instance of LockOptions, call create()
.Constructor and Description |
---|
LockOptions() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.Object |
clone()
Method to create a clone of this LockOptions object.
|
static LockOptions |
create()
Method used to instantiate an instance of a LockOptions object.
|
abstract java.lang.String |
getFilter()
Retrieve the filter that needs to be matched for the lock to succeed
|
abstract long |
getLockWait()
Retrieve the current setting for the amount of time to wait
to acquire the lock for a currently locked tuple.
|
abstract boolean |
isForget()
Retrieve the current setting for whether or not to return the tuple
being locked.
|
abstract LockOptions |
setFilter(java.lang.String filter)
Update the filter that would be matched for the lock to succeed.
|
abstract LockOptions |
setForget(boolean doForget)
Specify whether or not to return the tuple being locked.
|
abstract LockOptions |
setLockWait(long lockWait)
Specify the amount of time to wait to acquire the lock for
a tuple which is already locked.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getClosure, getResultHandler, setClosure, setResultHandler
public static LockOptions create()
public abstract java.lang.Object clone()
clone
in class java.lang.Object
public abstract LockOptions setLockWait(long lockWait)
lockWait
- The amount of time, in milliseconds, to wait
to lock a tuple.public abstract LockOptions setForget(boolean doForget)
doForget
- true - do not return the tuple being locked.
false - return the tuple being locked.public abstract long getLockWait()
public abstract boolean isForget()
public abstract java.lang.String getFilter()
public abstract LockOptions setFilter(java.lang.String filter)
filter
- The current filterCopyright (c) 2014 Cloud Software Group, Inc. All rights reserved.