class RemoteValidatorSubscriptions implements BeaconChainEventsListener {

  SubscriptionStatus subscribe(String id, Consumer<BeaconChainEvent> sendEvent) {
    synchronized (this) {
      if (subscriptions.size() >= maxSubscribers) {
        return SubscriptionStatus.maxSubscribers();
      } else {
        subscriptions.put(id, sendEvent);
        updateSubscribedValidatorsMetric();
        return SubscriptionStatus.success();
      }
    }
  }

    RemoteValidatorSubscriptions(
      final GlobalConfiguration configuration, final RemoteValidatorMetrics metrics);

}