@Test public void shouldBePublishedIfFarBehind() { millisSinceLastSweptTs.set(TargetedSweepMetricPublicationFilter.MINIMUM_STALE_DURATION.toMillis()); assertThat(filter.shouldPublish()).isTrue(); }
@Override public boolean shouldPublish() { if (publicationLatch.get()) { return true; } boolean conditionsAchieved = testConditions(); if (conditionsAchieved) { publicationLatch.set(true); } return conditionsAchieved; }
TargetedSweepMetricPublicationFilter implements MetricPublicationFilter { @Override public boolean shouldPublish() { if (publicationLatch.get()) { return true; } boolean conditionsAchieved = testConditions(); if (conditionsAchieved) { publicationLatch.set(true); } return conditionsAchieved; } }
TargetedSweepMetricPublicationFilter implements MetricPublicationFilter { @Override public boolean shouldPublish() { if (publicationLatch.get()) { return true; } boolean conditionsAchieved = testConditions(); if (conditionsAchieved) { publicationLatch.set(true); } return conditionsAchieved; } TargetedSweepMetricPublicationFilter(DecisionMetrics decisionMetrics); }
TargetedSweepMetricPublicationFilter implements MetricPublicationFilter { @Override public boolean shouldPublish() { if (publicationLatch.get()) { return true; } boolean conditionsAchieved = testConditions(); if (conditionsAchieved) { publicationLatch.set(true); } return conditionsAchieved; } TargetedSweepMetricPublicationFilter(DecisionMetrics decisionMetrics); @Override boolean shouldPublish(); }
TargetedSweepMetricPublicationFilter implements MetricPublicationFilter { @Override public boolean shouldPublish() { if (publicationLatch.get()) { return true; } boolean conditionsAchieved = testConditions(); if (conditionsAchieved) { publicationLatch.set(true); } return conditionsAchieved; } TargetedSweepMetricPublicationFilter(DecisionMetrics decisionMetrics); @Override boolean shouldPublish();  }