public abstract class BaseDiscoveryService extends Object implements DiscoveryService
Constructor and Description |
---|
BaseDiscoveryService() |
Modifier and Type | Method and Description |
---|---|
protected abstract AnnouncementRegistry |
getAnnouncementRegistry() |
protected abstract ClusterViewService |
getClusterViewService() |
protected DefaultTopologyView |
getOldView() |
TopologyView |
getTopology()
Returns the topology that was last discovered by this service.
|
protected abstract void |
handleIsolatedFromTopology() |
protected void |
setOldView(DefaultTopologyView view) |
protected abstract ClusterViewService getClusterViewService()
protected abstract AnnouncementRegistry getAnnouncementRegistry()
protected abstract void handleIsolatedFromTopology()
protected DefaultTopologyView getOldView()
protected void setOldView(DefaultTopologyView view)
public TopologyView getTopology()
DiscoveryService
If for some reason the service is currently not able to do topology discovery
it will return the last valid topology marked with
Note that this call is synchronized with false
in the call
to TopologyEventListener.handleTopologyEvent()
calls: ie if calls to TopologyEventListener.handleTopologyEvent()
are currently
ongoing, then the call to this method will block until all TopologyEventListener
s
have been called. Be careful not to cause deadlock situations.
getTopology
in interface DiscoveryService
DiscoveryService.getTopology()
Copyright © 2017 The Apache Software Foundation. All rights reserved.