public CassandraKeyspace(LifeCycleRegistry lifeCycle, String keyspaceName, CassandraCluster<Keyspace> astyanaxCluster, CassandraCluster<Session> cqlCluster) { _keyspaceName = keyspaceName; _astyanaxCluster = astyanaxCluster; _cqlCluster = cqlCluster; lifeCycle.manage(this); }
@Inject public CloudWatchScanCountListener(AmazonCloudWatch cloudWatch, List<Dimension> dimensions, LifeCycleRegistry lifecycle) { _cloudWatch = cloudWatch; _dimensions = dimensions; lifecycle.manage(new ManagedGuavaService(this)); }
@Override public <T extends Closeable> T manage(T closeable) { _managed.add(new ManagedCloseable(closeable)); return closeable; } }
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); }
@Override public void close() throws IOException { try { stop(); } catch (Exception e) { Throwables.propagateIfInstanceOf(e, IOException.class); throw Throwables.propagate(e); } }
public CassandraKeyspace(LifeCycleRegistry lifeCycle, String keyspaceName, CassandraCluster<Keyspace> astyanaxCluster, CassandraCluster<Session> cqlCluster) { _keyspaceName = keyspaceName; _astyanaxCluster = astyanaxCluster; _cqlCluster = cqlCluster; lifeCycle.manage(this); }
@Inject public FanoutLagMonitor(LifeCycleRegistry lifeCycle, MetricRegistry metricRegistry) { _metricRegistry = checkNotNull(metricRegistry, "metricRegistry"); _gauges = new MetricsGroup(metricRegistry); _lagTable = HashBasedTable.create(); lifeCycle.manage(new ManagedGuavaService(this)); }
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); }
@Override public void close() throws IOException { try { stop(); } catch (Exception e) { Throwables.propagateIfInstanceOf(e, IOException.class); throw Throwables.propagate(e); } }
@Override public <T extends Closeable> T manage(T closeable) { _managed.add(new ManagedCloseable(closeable)); return closeable; } }
public HintsPollerCQLSession(LifeCycleRegistry lifeCycle, CqlCluster cluster) { _cluster = cluster; lifeCycle.manage(this); }
@Inject public FanoutLagMonitor(LifeCycleRegistry lifeCycle, MetricRegistry metricRegistry) { _metricRegistry = checkNotNull(metricRegistry, "metricRegistry"); _gauges = new MetricsGroup(metricRegistry); _lagTable = HashBasedTable.create(); lifeCycle.manage(new ManagedGuavaService(this)); }
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); }
public HintsPollerCQLSession(LifeCycleRegistry lifeCycle, CqlCluster cluster) { _cluster = cluster; lifeCycle.manage(this); }
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); }
@Inject public DefaultCacheRegistry(LifeCycleRegistry lifeCycle, MetricRegistry metricRegistry) { lifeCycle.manage(this); _metricRegistry = metricRegistry; }
@Inject public VerifyRandomPartitioner(LifeCycleRegistry lifeCycle, CassandraKeyspace keyspace) { _keyspace = keyspace; lifeCycle.manage(this); }
@Inject public DefaultCacheRegistry(LifeCycleRegistry lifeCycle, MetricRegistry metricRegistry) { lifeCycle.manage(this); _metricRegistry = metricRegistry; }
@Inject public VerifyRandomPartitioner(LifeCycleRegistry lifeCycle, CassandraKeyspace keyspace) { _keyspace = keyspace; lifeCycle.manage(this); }
@Inject public ScanParticipationService(List<ScheduledDailyScanUpload> scheduledScans, final StashStateListener stashStateListener, LifeCycleRegistry lifeCycleRegistry, Clock clock) { _scheduledScans = scheduledScans; _clock = clock; // Create a runnable which announces scan participation when called _notificationRunnable = new Runnable() { @Override public void run() { stashStateListener.announceStashParticipation(); } }; lifeCycleRegistry.manage(this); }