Class SimpleRemoteInvokerRegistry
java.lang.Object
dev.getelements.elements.rt.remote.SimpleRemoteInvokerRegistry
- All Implemented Interfaces:
RemoteInvokerRegistry
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.getelements.elements.rt.remote.RemoteInvokerRegistry
RemoteInvokerRegistry.RemoteInvokerStatus
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllRemoteInvokers
(ApplicationId applicationId) Returns aRemoteInvoker
for all knownNodeId
s.Gets allRemoteInvoker
instances across all applications.getAllRemoteInvokerStatuses
(ApplicationId applicationId) Returns aRemoteInvoker
for all knownNodeId
s.getBestRemoteInvokerStatus
(ApplicationId applicationId) Returns aRemoteInvoker
by arbitrary selection.long
long
getRemoteInvoker
(NodeId nodeId) Returns theRemoteInvoker
registered under the given NodeId.jakarta.inject.Provider
<RemoteInvoker> long
void
refresh()
Forces or initiates a refresh of allNodeId
s available.void
setInstanceConnectionService
(InstanceConnectionService instanceConnectionService) void
setInstanceId
(InstanceId instanceId) void
setRefreshRateSeconds
(long refreshRateSeconds) void
setRefreshTimeoutSeconds
(long refreshTimeoutSeconds) void
setRemoteInvokerProvider
(jakarta.inject.Provider<RemoteInvoker> remoteInvokerProvider) void
setTotalRefreshTimeoutSeconds
(long totalRefreshTimeoutSeconds) void
start()
Starts thisRemoteInvokerRegistry
.void
stop()
STops thisRemoteInvokerRegistry
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.getelements.elements.rt.remote.RemoteInvokerRegistry
getBestRemoteInvoker
-
Field Details
-
REFRESH_RATE_SECONDS
- See Also:
-
REFRESH_TIMEOUT_SECONDS
- See Also:
-
TOTAL_REFRESH_TIMEOUT_SECONDS
- See Also:
-
DEFAULT_REFRESH_RATE
public static final long DEFAULT_REFRESH_RATE- See Also:
-
DEFAULT_REFRESH_TIMEOUT
public static final long DEFAULT_REFRESH_TIMEOUT- See Also:
-
DEFAULT_TOTAL_REFRESH_TIMEOUT
public static final long DEFAULT_TOTAL_REFRESH_TIMEOUT- See Also:
-
-
Constructor Details
-
SimpleRemoteInvokerRegistry
public SimpleRemoteInvokerRegistry()
-
-
Method Details
-
start
public void start()Description copied from interface:RemoteInvokerRegistry
Starts thisRemoteInvokerRegistry
.- Specified by:
start
in interfaceRemoteInvokerRegistry
-
stop
public void stop()Description copied from interface:RemoteInvokerRegistry
STops thisRemoteInvokerRegistry
.- Specified by:
stop
in interfaceRemoteInvokerRegistry
-
refresh
public void refresh()Description copied from interface:RemoteInvokerRegistry
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).- Specified by:
refresh
in interfaceRemoteInvokerRegistry
-
getAllRemoteInvokerStatuses
Description copied from interface:RemoteInvokerRegistry
Gets allRemoteInvoker
instances across all applications.- Specified by:
getAllRemoteInvokerStatuses
in interfaceRemoteInvokerRegistry
- Returns:
- the
List<RemoteInvoker>
-
getAllRemoteInvokerStatuses
public List<RemoteInvokerRegistry.RemoteInvokerStatus> getAllRemoteInvokerStatuses(ApplicationId applicationId) Description copied from interface:RemoteInvokerRegistry
Returns aRemoteInvoker
for all knownNodeId
s. This will be a perfect snapshot of the state of the registry.- Specified by:
getAllRemoteInvokerStatuses
in interfaceRemoteInvokerRegistry
- Parameters:
applicationId
-- Returns:
- a
List<RemoteInvoker>
-
getBestRemoteInvokerStatus
public RemoteInvokerRegistry.RemoteInvokerStatus getBestRemoteInvokerStatus(ApplicationId applicationId) Description copied from interface:RemoteInvokerRegistry
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.- Specified by:
getBestRemoteInvokerStatus
in interfaceRemoteInvokerRegistry
- Parameters:
applicationId
-
-
getAllRemoteInvokers
Description copied from interface:RemoteInvokerRegistry
Returns aRemoteInvoker
for all knownNodeId
s. This will be a perfect snapshot of the state of the registry.- Specified by:
getAllRemoteInvokers
in interfaceRemoteInvokerRegistry
- Parameters:
applicationId
-- Returns:
- a
List<RemoteInvoker>
-
getRemoteInvoker
Description copied from interface:RemoteInvokerRegistry
Returns theRemoteInvoker
registered under the given NodeId.- Specified by:
getRemoteInvoker
in interfaceRemoteInvokerRegistry
- 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.
-
getInstanceId
-
setInstanceId
-
getInstanceConnectionService
-
setInstanceConnectionService
@Inject public void setInstanceConnectionService(InstanceConnectionService instanceConnectionService) -
getRemoteInvokerProvider
-
setRemoteInvokerProvider
@Inject public void setRemoteInvokerProvider(jakarta.inject.Provider<RemoteInvoker> remoteInvokerProvider) -
getRefreshRateSeconds
public long getRefreshRateSeconds() -
setRefreshRateSeconds
@Inject public void setRefreshRateSeconds(@Named("dev.getelements.elements.rt.remote.invoker.registry.report.refresh.rate.seconds") long refreshRateSeconds) -
getRefreshTimeoutSeconds
public long getRefreshTimeoutSeconds() -
setRefreshTimeoutSeconds
@Inject public void setRefreshTimeoutSeconds(@Named("dev.getelements.elements.rt.remote.invoker.registry.report.refresh.timeout.seconds") long refreshTimeoutSeconds) -
getTotalRefreshTimeoutSeconds
public long getTotalRefreshTimeoutSeconds() -
setTotalRefreshTimeoutSeconds
@Inject public void setTotalRefreshTimeoutSeconds(@Named("dev.getelements.elements.rt.remote.invoker.registry.report.total.refresh.timeout.seconds") long totalRefreshTimeoutSeconds)
-