com.threerings.presents.peer.server
Interface PeerManager.LockedOperation

Enclosing class:
PeerManager

public static interface PeerManager.LockedOperation

Wraps an operation that needs a shared resource lock to be acquired before it can be performed, and released after it completes. Used by PeerManager.performWithLock(com.threerings.presents.peer.data.NodeObject.Lock, com.threerings.presents.peer.server.PeerManager.LockedOperation).


Method Summary
 void fail(String peerName)
          Called when the resource lock was not acquired successfully, with the name of the peer who is holding the lock (or null in case of a generic failure).
 void run()
          Called when the resource lock was acquired successfully.
 

Method Detail

run

void run()
Called when the resource lock was acquired successfully. The lock will be released immediately after this function call finishes.


fail

void fail(String peerName)
Called when the resource lock was not acquired successfully, with the name of the peer who is holding the lock (or null in case of a generic failure).