+ public <S extends RpcService> void unregisterRpcServiceImplementation(final Class<S> serviceClass) {
+ LOG.trace("Try to unregister serviceClass {} for Node {}", serviceClass, nodeInstanceIdentifier.getKey().getId());
+ final RoutedRpcRegistration<?> rpcRegistration = rpcRegistrations.remove(serviceClass);
+ if (rpcRegistration != null) {
+ rpcRegistration.unregisterPath(NodeContext.class, nodeInstanceIdentifier);
+ rpcRegistration.close();
+ LOG.debug("Unregistration serviceClass {} for Node {}", serviceClass, nodeInstanceIdentifier.getKey().getId());
+ }
+ }
+
+ @VisibleForTesting
+ boolean isEmptyRpcRegistrations() {
+ return this.rpcRegistrations.isEmpty();
+ }
+
+ @Override
+ public void setStatisticsRpcEnabled(boolean isStatisticsRpcEnabled) {
+ this.isStatisticsRpcEnabled = isStatisticsRpcEnabled;
+ }
+
+ @Override
+ public boolean isStatisticsRpcEnabled() {
+ return isStatisticsRpcEnabled;
+ }
+
+ @Override
+ public CONTEXT_STATE getState() {
+ return this.state;
+ }
+
+ @Override
+ public void setState(CONTEXT_STATE state) {
+ this.state = state;
+ }
+
+ @Override
+ public ServiceGroupIdentifier getServiceIdentifier() {
+ return this.deviceInfo.getServiceIdentifier();
+ }
+
+ @Override
+ public DeviceInfo getDeviceInfo() {
+ return this.deviceInfo;