com.threerings.presents.dobj
Class ReleaseLockEvent
java.lang.Object
com.threerings.presents.dobj.DEvent
com.threerings.presents.dobj.NamedEvent
com.threerings.presents.dobj.ReleaseLockEvent
- All Implemented Interfaces:
- Streamable
public class ReleaseLockEvent
- extends NamedEvent
A release lock event is dispatched at the end of a chain of events to release a lock that is
intended to prevent some application defined activity from happening until those events have
been processed. This is an entirely cooperative locking system, meaning that the application
will have to explicitly attempt acquisition of the lock to find out if the lock has yet been
released. These locks don't actually prevent any of the distributed object machinery from
functioning.
- See Also:
DObjectManager.postEvent(com.threerings.presents.dobj.DEvent)
|
Constructor Summary |
ReleaseLockEvent(int targetOid,
String name)
Constructs a new release lock event for the specified target object with the supplied lock
name. |
|
Method Summary |
boolean |
applyToObject(DObject target)
Applies this lock release to the object. |
boolean |
isPrivate()
Some events are used only internally on the server and need not be broadcast to subscribers,
proxy or otherwise. |
protected void |
toString(StringBuilder buf)
This should be overridden by derived classes (which should be sure to call
super.toString()) to append the derived class specific event information to the
string buffer. |
| Methods inherited from class com.threerings.presents.dobj.DEvent |
alreadyApplied, getActualTransport, getSourceOid, getTargetOid, getTransport, noteActualTransport, notifyListener, setSourceOid, setTargetOid, setTransport, toString |
ReleaseLockEvent
public ReleaseLockEvent(int targetOid,
String name)
- Constructs a new release lock event for the specified target object with the supplied lock
name.
- Parameters:
targetOid - the object id of the object in question.name - the name of the lock to release.
isPrivate
public boolean isPrivate()
- Description copied from class:
DEvent
- Some events are used only internally on the server and need not be broadcast to subscribers,
proxy or otherwise. Such events can return true here and short-circuit the normal proxy
event dispatch mechanism.
- Overrides:
isPrivate in class DEvent
applyToObject
public boolean applyToObject(DObject target)
throws ObjectAccessException
- Applies this lock release to the object.
- Specified by:
applyToObject in class DEvent
- Returns:
- true if the object manager should go on to notify the object's listeners of this
event, false if the event should be treated silently and the listeners should not be
notified.
- Throws:
ObjectAccessException - thrown if there is any problem applying the event to the
object (invalid attribute, etc.).
toString
protected void toString(StringBuilder buf)
- Description copied from class:
DEvent
- This should be overridden by derived classes (which should be sure to call
super.toString()) to append the derived class specific event information to the
string buffer.
- Overrides:
toString in class NamedEvent