congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
ServiceFailureListener
Code IndexAdd Tabnine to your IDE (free)

How to use
ServiceFailureListener
in
com.bazaarvoice.emodb.common.dropwizard.lifecycle

Best Java code snippets using com.bazaarvoice.emodb.common.dropwizard.lifecycle.ServiceFailureListener (Showing top 20 results out of 315)

origin: com.bazaarvoice.emodb/emodb-table

public HintsPollerService(String clusterName, ValueStore<Long> timestamp, Session cqlSession, ClusterHintsPoller clusterHintsPoller, MetricRegistry metricRegistry) {
  _clusterName = checkNotNull(clusterName, "cluster");
  _timestamp = checkNotNull(timestamp, "value");
  _cqlSession = checkNotNull(cqlSession, "cqlSession");
  _clusterHintsPoller = checkNotNull(clusterHintsPoller, "clusterHintsPoller");
  ServiceFailureListener.listenTo(this, metricRegistry);
}
origin: com.bazaarvoice.emodb/emodb-common-dropwizard

public static void listenTo(Service service, MetricRegistry metricRegistry) {
  service.addListener(new ServiceFailureListener(service, metricRegistry), MoreExecutors.sameThreadExecutor());
}
origin: bazaarvoice/emodb

public HintsPollerService(String clusterName, ValueStore<Long> timestamp, Session cqlSession, ClusterHintsPoller clusterHintsPoller, MetricRegistry metricRegistry) {
  _clusterName = checkNotNull(clusterName, "cluster");
  _timestamp = checkNotNull(timestamp, "value");
  _cqlSession = checkNotNull(cqlSession, "cqlSession");
  _clusterHintsPoller = checkNotNull(clusterHintsPoller, "clusterHintsPoller");
  ServiceFailureListener.listenTo(this, metricRegistry);
}
origin: bazaarvoice/emodb

public static void listenTo(Service service, MetricRegistry metricRegistry) {
  service.addListener(new ServiceFailureListener(service, metricRegistry), MoreExecutors.sameThreadExecutor());
}
origin: com.bazaarvoice.emodb/emodb-event

public DedupQueue(String name, String readChannel, String writeChannel,
         QueueDAO queueDAO, EventStore eventStore, Supplier<Boolean> dedupEnabled,
         ScheduledExecutorService executor, SortedQueueFactory sortedQueueFactory, MetricRegistry metricRegistry) {
  _name = checkNotNull(name, "name");
  _readChannel = checkNotNull(readChannel, "readChannel");
  _writeChannel = checkNotNull(writeChannel, "writeChannel");
  _queueDAO = checkNotNull(queueDAO, "queueDAO");
  _eventStore = checkNotNull(eventStore, "eventStore");
  _dedupEnabled = checkNotNull(dedupEnabled, "dedupEnabled");
  _executor = checkNotNull(executor, "executor");
  _sortedQueueFactory = sortedQueueFactory;
  ServiceFailureListener.listenTo(this, metricRegistry);
}
origin: bazaarvoice/emodb

public DedupQueue(String name, String readChannel, String writeChannel,
         QueueDAO queueDAO, EventStore eventStore, Supplier<Boolean> dedupEnabled,
         ScheduledExecutorService executor, SortedQueueFactory sortedQueueFactory, MetricRegistry metricRegistry) {
  _name = checkNotNull(name, "name");
  _readChannel = checkNotNull(readChannel, "readChannel");
  _writeChannel = checkNotNull(writeChannel, "writeChannel");
  _queueDAO = checkNotNull(queueDAO, "queueDAO");
  _eventStore = checkNotNull(eventStore, "eventStore");
  _dedupEnabled = checkNotNull(dedupEnabled, "dedupEnabled");
  _executor = checkNotNull(executor, "executor");
  _sortedQueueFactory = sortedQueueFactory;
  ServiceFailureListener.listenTo(this, metricRegistry);
}
origin: com.bazaarvoice.emodb/emodb-databus

public SystemQueueMonitor(DatabusEventStore eventStore, DataCenters dataCenters,
             Collection<ClusterInfo> clusterInfo, int masterFanoutPartitions,
             int dataCenterFanoutPartitions, MetricRegistry metricRegistry) {
  _eventStore = checkNotNull(eventStore, "eventStore");
  _dataCenters = checkNotNull(dataCenters, "dataCenters");
  _clusterInfo = checkNotNull(clusterInfo, "clusterInfo");
  _masterFanoutPartitions = masterFanoutPartitions;
  _dataCenterFanoutPartitions = dataCenterFanoutPartitions;
  _gauges = new MetricsGroup(metricRegistry);
  ServiceFailureListener.listenTo(this, metricRegistry);
}
origin: bazaarvoice/emodb

public SystemQueueMonitor(DatabusEventStore eventStore, DataCenters dataCenters,
             Collection<ClusterInfo> clusterInfo, int masterFanoutPartitions,
             int dataCenterFanoutPartitions, MetricRegistry metricRegistry) {
  _eventStore = checkNotNull(eventStore, "eventStore");
  _dataCenters = checkNotNull(dataCenters, "dataCenters");
  _clusterInfo = checkNotNull(clusterInfo, "clusterInfo");
  _masterFanoutPartitions = masterFanoutPartitions;
  _dataCenterFanoutPartitions = dataCenterFanoutPartitions;
  _gauges = new MetricsGroup(metricRegistry);
  ServiceFailureListener.listenTo(this, metricRegistry);
}
origin: com.bazaarvoice.emodb/emodb-table

  @Override
  public LeaderService get() {
    LeaderService service = new LeaderService(
        curator, "/leader/table-maintenance", self.toString(),
        "Leader-TableMaintenance-" + scope, 1, TimeUnit.MINUTES,
        maintenanceServiceFactory);
    ServiceFailureListener.listenTo(service, metricRegistry);
    dropwizardTask.register(scope.toLowerCase() + "-maintenance", service);
    return service;
  }
};
origin: com.bazaarvoice.emodb/emodb-event

private Optional<LeaderService> startService(final String name) {
  if (!isOwner(name)) {
    return Optional.absent();
  }
  _log.info("Starting owned service {}: {}", _group, name);
  String zkLeaderPath = String.format("/leader/%s/%s", _group.toLowerCase(), name);
  String threadName = String.format("Leader-%s-%s", _group, name);
  String taskName = String.format("%s-%s", _group.toLowerCase(), name);
  LeaderService leaderService = new LeaderService(_curator, zkLeaderPath, _selfId,
      threadName, 1, TimeUnit.MINUTES, new Supplier<Service>() {
    @Override
    public Service get() {
      return _factory.create(name);
    }
  });
  ServiceFailureListener.listenTo(leaderService, _metricRegistry);
  _dropwizardTask.register(taskName, leaderService);
  leaderService.start();
  return Optional.of(leaderService);
}
origin: bazaarvoice/emodb

  @Override
  public LeaderService get() {
    LeaderService service = new LeaderService(
        curator, "/leader/table-maintenance", self.toString(),
        "Leader-TableMaintenance-" + scope, 1, TimeUnit.MINUTES,
        maintenanceServiceFactory);
    ServiceFailureListener.listenTo(service, metricRegistry);
    dropwizardTask.register(scope.toLowerCase() + "-maintenance", service);
    return service;
  }
};
origin: bazaarvoice/emodb

private Optional<LeaderService> startService(final String name) {
  if (!isOwner(name)) {
    return Optional.absent();
  }
  _log.info("Starting owned service {}: {}", _group, name);
  String zkLeaderPath = String.format("/leader/%s/%s", _group.toLowerCase(), name);
  String threadName = String.format("Leader-%s-%s", _group, name);
  String taskName = String.format("%s-%s", _group.toLowerCase(), name);
  LeaderService leaderService = new LeaderService(_curator, zkLeaderPath, _selfId,
      threadName, 1, TimeUnit.MINUTES, new Supplier<Service>() {
    @Override
    public Service get() {
      return _factory.create(name);
    }
  });
  ServiceFailureListener.listenTo(leaderService, _metricRegistry);
  _dropwizardTask.register(taskName, leaderService);
  leaderService.start();
  return Optional.of(leaderService);
}
origin: com.bazaarvoice.emodb/emodb-databus

@VisibleForTesting
Canary(ClusterInfo cluster, Condition subscriberCondition, Databus databus, RateLimitedLogFactory logFactory,
    MetricRegistry metricRegistry, @Nullable ScheduledExecutorService executor) {
  _databus = checkNotNull(databus, "databus");
  _timers = new MetricsGroup(metricRegistry);
  checkNotNull(cluster, "cluster");
  _subscriptionName = ChannelNames.getMasterCanarySubscription(cluster.getCluster());
  _subscriptionCondition = checkNotNull(subscriberCondition, "subscriptionCondition");
  _timerName = newTimerName("readEventsByCanaryPoll-" + cluster.getClusterMetric());
  _rateLimitedLog = logFactory.from(_log);
  _executor = executor;
  createCanarySubscription();
  ServiceFailureListener.listenTo(this, metricRegistry);
}
origin: bazaarvoice/emodb

@VisibleForTesting
Canary(ClusterInfo cluster, Condition subscriberCondition, Databus databus, RateLimitedLogFactory logFactory,
    MetricRegistry metricRegistry, @Nullable ScheduledExecutorService executor) {
  _databus = checkNotNull(databus, "databus");
  _timers = new MetricsGroup(metricRegistry);
  checkNotNull(cluster, "cluster");
  _subscriptionName = ChannelNames.getMasterCanarySubscription(cluster.getCluster());
  _subscriptionCondition = checkNotNull(subscriberCondition, "subscriptionCondition");
  _timerName = newTimerName("readEventsByCanaryPoll-" + cluster.getClusterMetric());
  _rateLimitedLog = logFactory.from(_log);
  _executor = executor;
  createCanarySubscription();
  ServiceFailureListener.listenTo(this, metricRegistry);
}
origin: bazaarvoice/emodb

ServiceFailureListener.listenTo(leaderService, metricRegistry);
dropwizardTask.register("hints-" + clusterName, leaderService);
_leaderServiceList.add(leaderService);
origin: com.bazaarvoice.emodb/emodb-table

ServiceFailureListener.listenTo(leaderService, metricRegistry);
dropwizardTask.register("hints-" + clusterName, leaderService);
_leaderServiceList.add(leaderService);
origin: com.bazaarvoice.emodb/emodb-databus

_lastLagStopwatch = Stopwatch.createStarted(ClockTicker.getTicker(clock));
_clock = clock;
ServiceFailureListener.listenTo(this, metricRegistry);
origin: bazaarvoice/emodb

_lastLagStopwatch = Stopwatch.createStarted(ClockTicker.getTicker(clock));
_clock = clock;
ServiceFailureListener.listenTo(this, metricRegistry);
origin: bazaarvoice/emodb

  @Inject
  public MigratorMonitor(@ScannerZooKeeper CuratorFramework curator, @SelfHostAndPort HostAndPort selfHostAndPort,
              final ScanWorkflow workflow, final MigratorStatusDAO statusDAO,
              final DataTools dataTools, LifeCycleRegistry lifecycle, LeaderServiceTask leaderServiceTask,
              MetricRegistry metricRegistry) {
    super(curator, LEADER_DIR, selfHostAndPort.toString(), SERVICE_NAME, 1, TimeUnit.MINUTES,
        new Supplier<Service>() {
          @Override
          public Service get() {
            return new LocalMigratorMonitor(workflow, statusDAO, dataTools);
          }
        });

    ServiceFailureListener.listenTo(this, metricRegistry);
    leaderServiceTask.register(SERVICE_NAME, this);
    lifecycle.manage(new ManagedGuavaService(this));
  }
}
origin: bazaarvoice/emodb

@Inject
public ScanUploadSchedulingService(@ScannerZooKeeper CuratorFramework curator, @SelfHostAndPort HostAndPort selfHostAndPort,
                  final ScanUploader scanUploader, final List<ScheduledDailyScanUpload> scheduledScans,
                  final ScanCountListener scanCountListener, final StashRequestManager stashRequestManager,
                  LifeCycleRegistry lifecycle, LeaderServiceTask leaderServiceTask,
                  final MetricRegistry metricRegistry,
                  final Clock clock) {
  super(curator, LEADER_DIR, selfHostAndPort.toString(), SERVICE_NAME, 1, TimeUnit.MINUTES,
      new Supplier<Service>() {
        @Override
        public Service get() {
          return new DelegateSchedulingService(scanUploader, stashRequestManager, scheduledScans, scanCountListener, clock);
        }
      });
  ServiceFailureListener.listenTo(this, metricRegistry);
  leaderServiceTask.register(SERVICE_NAME, this);
  lifecycle.manage(new ManagedGuavaService(this));
}
com.bazaarvoice.emodb.common.dropwizard.lifecycleServiceFailureListener

Javadoc

Watches a Guava service and logs when it fails, usually because it threw an uncaught exception that bubbled out of the main service run method.

Most used methods

  • listenTo
  • <init>

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JTextField (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now