@Test public void typeClears() throws Exception { long txId = seedTransaction(); zooStore.reserve(txId); zooStore.setStatus(txId, ReadOnlyTStore.TStatus.SUCCESSFUL); zooStore.unreserve(txId, 50); FateMetrics metrics = new FateMetrics(context, 10); metrics.overrideRefresh(0); InMemTestCollector collector = new InMemTestCollector(); metrics.getMetrics(collector, true); assertEquals(0L, collector.getValue("FateTxState_IN_PROGRESS")); assertEquals(1L, collector.getValue("FateTxState_SUCCESSFUL")); assertNull(collector.getValue("FateTxOpType_FakeOp")); }
void overrideRefresh(final long minimumRefreshDelay) { long delay = Math.max(0, minimumRefreshDelay); this.minimumRefreshDelay = TimeUnit.SECONDS.toMillis(delay); }
FateMetrics extends MasterMetrics { void overrideRefresh(final long minimumRefreshDelay) { long delay = Math.max(0, minimumRefreshDelay); this.minimumRefreshDelay = TimeUnit.SECONDS.toMillis(delay); } }
FateMetrics extends MasterMetrics { void overrideRefresh(final long minimumRefreshDelay) { long delay = Math.max(0, minimumRefreshDelay); this.minimumRefreshDelay = TimeUnit.SECONDS.toMillis(delay); } FateMetrics(final ServerContext context, final long minimumRefreshDelay); }
FateMetrics extends MasterMetrics { void overrideRefresh(final long minimumRefreshDelay) { long delay = Math.max(0, minimumRefreshDelay); this.minimumRefreshDelay = TimeUnit.SECONDS.toMillis(delay); } FateMetrics(final ServerContext context, final long minimumRefreshDelay);  }
FateMetrics extends MasterMetrics { void overrideRefresh(final long minimumRefreshDelay) { long delay = Math.max(0, minimumRefreshDelay); this.minimumRefreshDelay = TimeUnit.SECONDS.toMillis(delay); } FateMetrics(final ServerContext context, final long minimumRefreshDelay);   }