Interface RemoteInvokerRegistry
- All Known Implementing Classes:
SimpleRemoteInvokerRegistry
public interface RemoteInvokerRegistry
Manages connections to the cluster.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Represents the remote invoker status. -
Method Summary
Modifier and TypeMethodDescriptiondefault List
<RemoteInvoker> getAllRemoteInvokers
(ApplicationId applicationId) Returns aRemoteInvoker
for all knownNodeId
s.Gets allRemoteInvoker
instances across all applications.getAllRemoteInvokerStatuses
(ApplicationId applicationId) Returns aRemoteInvoker
for all knownNodeId
s.default RemoteInvoker
getBestRemoteInvoker
(ApplicationId applicationId) Returns aRemoteInvoker
by arbitrary selection.getBestRemoteInvokerStatus
(ApplicationId applicationId) Returns aRemoteInvoker
by arbitrary selection.getRemoteInvoker
(NodeId nodeId) Returns theRemoteInvoker
registered under the given NodeId.void
refresh()
Forces or initiates a refresh of allNodeId
s available.void
start()
Starts thisRemoteInvokerRegistry
.void
stop()
STops thisRemoteInvokerRegistry
.
-
Method Details
-
start
void start()Starts thisRemoteInvokerRegistry
. -
stop
void stop()STops thisRemoteInvokerRegistry
. -
refresh
void refresh()Forces or initiates a refresh of allNodeId
s available. Opening new connections if necessary. This will block until the refresh operation has been completed and all new connections established (if necessary). -
getAllRemoteInvokerStatuses
List<RemoteInvokerRegistry.RemoteInvokerStatus> getAllRemoteInvokerStatuses()Gets allRemoteInvoker
instances across all applications.- Returns:
- the
List<RemoteInvoker>
-
getAllRemoteInvokerStatuses
List<RemoteInvokerRegistry.RemoteInvokerStatus> getAllRemoteInvokerStatuses(ApplicationId applicationId) Returns aRemoteInvoker
for all knownNodeId
s. This will be a perfect snapshot of the state of the registry.- Parameters:
applicationId
-- Returns:
- a
List<RemoteInvoker>
-
getAllRemoteInvokers
Returns aRemoteInvoker
for all knownNodeId
s. This will be a perfect snapshot of the state of the registry.- Parameters:
applicationId
-- Returns:
- a
List<RemoteInvoker>
-
getBestRemoteInvoker
Returns aRemoteInvoker
by arbitrary selection. The underlyingRemoteInvokerRegistry
may employ heuristics to determine the most suitableRemoteInvoker
to return. However, this defers entirely to the underlying implementation to make that determination.- Parameters:
applicationId
-
-
getBestRemoteInvokerStatus
Returns aRemoteInvoker
by arbitrary selection. The underlyingRemoteInvokerRegistry
may employ heuristics to determine the most suitableRemoteInvoker
to return. However, this defers entirely to the underlying implementation to make that determination.- Parameters:
applicationId
-
-
getRemoteInvoker
Returns theRemoteInvoker
registered under the given NodeId.- Parameters:
nodeId
- the node identifier (may be a NodeId for either an instance or application).- Returns:
- a RemoteInvoker for the given nodeId, or null if not found.
-