com.threerings.whirled.zone.peer.server

## Class ZonePeerManager

- java.lang.Object
- - com.threerings.presents.peer.server.PeerManager
  - - com.threerings.crowd.peer.server.CrowdPeerManager
    - - com.threerings.whirled.zone.peer.server.ZonePeerManager

All Implemented Interfaces:
  Lifecycle.BaseComponent, Lifecycle.ShutdownComponent, com.threerings.crowd.chat.server.ChatProvider.ChatForwarder, com.threerings.crowd.peer.server.CrowdPeerProvider, com.threerings.presents.peer.server.PeerProvider, com.threerings.presents.server.ClientManager.ClientObserver, com.threerings.presents.server.InvocationProvider

    public abstract class ZonePeerManager
    extends com.threerings.crowd.peer.server.CrowdPeerManager

### Nested Class Summary

Nested Classes
`static class` `ZonePeerManager.NodeFunc<T>` Useful with `PeerManager.lookupNodeDatum(com.google.common.base.Function<com.threerings.presents.peer.data.NodeObject, T>)`.

### Nested classes/interfaces inherited from class com.threerings.presents.peer.server.PeerManager

`com.threerings.presents.peer.server.PeerManager.DroppedLockObserver, com.threerings.presents.peer.server.PeerManager.LockedOperation, com.threerings.presents.peer.server.PeerManager.NodeAction, com.threerings.presents.peer.server.PeerManager.NodeApplicant, com.threerings.presents.peer.server.PeerManager.NodeRequest, com.threerings.presents.peer.server.PeerManager.StaleCacheObserver, com.threerings.presents.peer.server.PeerManager.Stats`

### Constructor Summary

Constructors
Constructor and Description
`ZonePeerManager(Lifecycle cycle)` Creates an uninitialized peer manager.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`Tuple<String,HostedZone>` `getZoneHost(int zoneId)` Returns the node name of the peer that is hosting the specified scene, or null if no peer has published that they are hosting the scene.
`static com.threerings.presents.peer.data.NodeObject.Lock` `getZoneLock(int sceneId)` Returns a lock used to claim resolution of the specified scene.
`void` `zoneDidShutdown(int zoneId)` Called by the ZoneManager when it is no longer hosting a scene.
`void` `zoneDidStartup(int zoneId, com.threerings.util.Name name)` Called by the ZoneManager when it is hosting a zone.

### Methods inherited from class com.threerings.crowd.peer.server.CrowdPeerManager

`deliverBroadcast, deliverTell, forwardBroadcast, forwardTell, shutdown`

### Methods inherited from class com.threerings.presents.peer.server.PeerManager

`acquireLock, addDroppedLockObserver, addStaleCacheObserver, broadcastStaleCacheData, clientSessionDidEnd, clientSessionDidStart, clientSubscribedToNode, clientUnsubscribedFromNode, findApplicableNodes, generateReport, getNodeObject, getNodeObjects, getPeerClient, getPeerInternalHostName, getPeerNodeObject, getPeerPort, getPeerPublicHostName, getStats, init, init, init, init, invokeAction, invokeNodeAction, invokeNodeAction, invokeNodeAction, invokeNodeRequest, invokeNodeRequest, invokeOnNodes, invokeRequest, isAuthenticPeer, locateClient, lookupNodeDatum, performWithLock, proxyRemoteObject, proxyRemoteObject, queryLock, queryLock, ratifyLockAction, reacquireLock, releaseLock, removeDroppedLockObserver, removeStaleCacheObserver, unproxyRemoteObject, unproxyRemoteObject`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ZonePeerManager

    @Inject
    public ZonePeerManager(Lifecycle cycle)

Creates an uninitialized peer manager.

### Method Detail

#### getZoneLock

    public static com.threerings.presents.peer.data.NodeObject.Lock getZoneLock(int sceneId)

Returns a lock used to claim resolution of the specified scene.

#### getZoneHost

    public Tuple<String,HostedZone> getZoneHost(int zoneId)

Returns the node name of the peer that is hosting the specified scene, or null if no peer has published that they are hosting the scene.

#### zoneDidStartup

    public void zoneDidStartup(int zoneId,
                               com.threerings.util.Name name)

Called by the ZoneManager when it is hosting a zone.

#### zoneDidShutdown

    public void zoneDidShutdown(int zoneId)

Called by the ZoneManager when it is no longer hosting a scene.