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 |
---|---|
static LockOptions |
create()
Method used to instantiate an instance of a LockOptions object.
|
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 |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getClosure, getResultHandler, setClosure, setResultHandler
public static LockOptions create()
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()
Copyright (c) 2013 TIBCO Software Inc. All rights reserved.