Class StaticInstanceDiscoveryService
java.lang.Object
dev.getelements.elements.rt.remote.StaticInstanceDiscoveryService
- All Implemented Interfaces:
InstanceDiscoveryService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the known remote hosts.voidsetHostInfoSet(Set<InstanceHostInfo> hostInfoSet) voidstart()voidstop()subscribeToDiscovery(Consumer<InstanceHostInfo> instanceHostInfoConsumer) Subscribes to an event that fires when a new host joins the network.subscribeToUndiscovery(Consumer<InstanceHostInfo> instanceHostInfoConsumer) Subscribes to an event that fires when a host leaves the network.
-
Field Details
-
STATIC_HOST_INFO
- See Also:
-
-
Constructor Details
-
StaticInstanceDiscoveryService
public StaticInstanceDiscoveryService()
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceInstanceDiscoveryService
-
stop
public void stop()- Specified by:
stopin interfaceInstanceDiscoveryService
-
getKnownHosts
Description copied from interface:InstanceDiscoveryServiceGets the known remote hosts.- Specified by:
getKnownHostsin interfaceInstanceDiscoveryService- Returns:
- a
Set<String>containing the remote hosts
-
subscribeToDiscovery
Description copied from interface:InstanceDiscoveryServiceSubscribes to an event that fires when a new host joins the network.- Specified by:
subscribeToDiscoveryin interfaceInstanceDiscoveryService- Parameters:
instanceHostInfoConsumer- theInstanceHostInfo- Returns:
- the
Subscription
-
subscribeToUndiscovery
Description copied from interface:InstanceDiscoveryServiceSubscribes to an event that fires when a host leaves the network.- Specified by:
subscribeToUndiscoveryin interfaceInstanceDiscoveryService- Parameters:
instanceHostInfoConsumer- theInstanceHostInfo- Returns:
- the
Subscription
-
getHostInfoSet
-
setHostInfoSet
@Inject public void setHostInfoSet(@Named("dev.getelements.elements.rt.static.host.info") Set<InstanceHostInfo> hostInfoSet)
-