List of usage examples for java.util.concurrent ConcurrentLinkedDeque getLast
public E getLast()
From source file:org.apache.eagle.alert.engine.publisher.dedup.DedupCache.java
private DedupValue updateCount(EventUniq eventEniq) { ConcurrentLinkedDeque<DedupValue> dedupValues = events.get(eventEniq); if (dedupValues == null || dedupValues.size() <= 0) { LOG.warn("{} No dedup values found for {}, cannot update count", this.publishName, eventEniq); return null; } else {//from w w w . ja v a2s . c o m DedupValue dedupValue = dedupValues.getLast(); dedupValue.setCount(dedupValue.getCount() + 1); String updateMsg = String.format("%s Update count for dedup key %s, value %s and count %s", this.publishName, eventEniq, dedupValue.getStateFieldValue(), dedupValue.getCount()); if (LOG.isDebugEnabled()) { LOG.debug(updateMsg); } return dedupValue; } }