ResolvedAddress - the type of address after resolution.public interface ServiceDiscovererEvent<ResolvedAddress>
Interpreting Events
ResolvedAddress overriding any previously known
ServiceDiscovererEvent.Status and any associated meta-data.Example
We can represent a ServiceDiscovererEvent as map entries of the form
(ResolvedAddress, (ServiceDiscovererEvent.Status, meta-data)) where the ResolvedAddress is the map key.
Starting with the initial state of {addr1, (AVAILABLE, meta-1)}. Upon subscribing to the event stream the initial
state is populated via the event (addr1, (AVAILABLE, meta-1)).
Say the meta-data for address changes resulting in a system state {addr1, (AVAILABLE, meta-2)}. The state change is
be represented by the event (addr1, (AVAILABLE, meta-2)).
Next the address is removed from the system resulting in an empty state {}. It is up to the
ServiceDiscoverer whether this will be represented by the ServiceDiscovererEvent.Status.UNAVAILABLE or
ServiceDiscovererEvent.Status.EXPIRED but both are logically equivalent to removal, only with different meanings for how
resources already acquired to the address should be used. Picking UNAVAILABLE, the transition back to the empty state
would be represented by the event (addr1, (UNAVAILABLE, meta-2)).
See ServiceDiscoverer for the interface that defines the source of event streams.| Modifier and Type | Interface and Description |
|---|---|
static class |
ServiceDiscovererEvent.Status
Status provided by the
ServiceDiscoverer system that guides the actions of LoadBalancer upon the
bound address() (via ServiceDiscovererEvent). |
| Modifier and Type | Method and Description |
|---|---|
ResolvedAddress |
address()
Get the resolved address which is the subject of this event.
|
ServiceDiscovererEvent.Status |
status()
Status of the event instructing the ServiceDiscoverer what actions
to take upon the associated address. |
ResolvedAddress address()
ServiceDiscovererEvent.Status status()
Status of the event instructing the ServiceDiscoverer what actions
to take upon the associated address.