org.codehaus.wadi.servicespace.basic
Class BasicSingletonServiceHolder
java.lang.Object
org.codehaus.wadi.servicespace.basic.BasicSingletonServiceHolder
- All Implemented Interfaces:
- Lifecycle, ServiceHolder, SingletonServiceHolder
public class BasicSingletonServiceHolder
- extends java.lang.Object
- implements SingletonServiceHolder
- Version:
- $Revision: 1538 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicSingletonServiceHolder
public BasicSingletonServiceHolder(ServiceSpace serviceSpace,
ServiceName serviceName,
java.lang.Object service)
start
public void start()
throws java.lang.Exception
- Specified by:
start
in interface Lifecycle
- Throws:
java.lang.Exception
stop
public void stop()
throws java.lang.Exception
- Specified by:
stop
in interface Lifecycle
- Throws:
java.lang.Exception
isLocal
public boolean isLocal()
- Specified by:
isLocal
in interface SingletonServiceHolder
getHostingPeer
public org.codehaus.wadi.group.Peer getHostingPeer()
- Specified by:
getHostingPeer
in interface SingletonServiceHolder
getService
public java.lang.Object getService()
- Specified by:
getService
in interface ServiceHolder
isStarted
public boolean isStarted()
- Specified by:
isStarted
in interface ServiceHolder
updateHostingPeer
protected void updateHostingPeer(org.codehaus.wadi.group.Peer newHostingPeer,
boolean callbackService)
onElection
protected void onElection()
onDismissal
protected void onDismissal()
elect
protected void elect(java.util.Set<org.codehaus.wadi.group.Peer> newHostingPeers,
boolean callbackService)
newDelegateServiceHolder
protected ServiceHolder newDelegateServiceHolder(ServiceSpace serviceSpace,
ServiceName serviceName,
java.lang.Object service)
newSingletonElector
protected BasicSingletonServiceHolder.SeniorityElector newSingletonElector()
Copyright © 2008. All Rights Reserved.