result = compiledExprCache.get(reg_ex_str);
public long getLastSeqId(ProducerId id) { long result = -1; BitArrayBin bab = map.get(id.toString()); if (bab != null) { result = bab.getLastSetIndex(); } return result; }
private BooleanExpression getExpression(String selector) throws Exception{ BooleanExpression result; synchronized(expressionCache){ result = expressionCache.get(selector); if (result == null){ result = compileSelector(selector); expressionCache.put(selector,result); } } return result; }
protected ActiveMQDestination getQueueConsumersWildcard(ActiveMQDestination original) { ActiveMQQueue queue; synchronized (cache) { queue = cache.get(original); if (queue == null) { queue = new ActiveMQQueue(prefix + original.getPhysicalName() + postfix); cache.put(original, queue); } } return queue; } }
public void rollback(final String id) { String seed = IdGenerator.getSeedFromId(id); if (seed != null) { BitArrayBin bab = map.get(seed); if (bab != null) { long index = IdGenerator.getSequenceFromId(id); bab.setBit(index, false); modified = true; } } }
/** * Check the message id is in order * * @param id * * @return true if the id is in order */ public boolean isInOrder(final String id) { boolean answer = true; if (id != null) { String seed = IdGenerator.getSeedFromId(id); if (seed != null) { BitArrayBin bab = map.get(seed); if (bab != null) { long index = IdGenerator.getSequenceFromId(id); answer = bab.isInOrder(index); modified = true; } } } return answer; }
/** * mark this message as being received * * @param id */ public void rollback(final MessageId id) { if (id != null) { ProducerId pid = id.getProducerId(); if (pid != null) { BitArrayBin bab = map.get(pid.toString()); if (bab != null) { bab.setBit(id.getProducerSequenceId(), false); modified = true; } } } }
/** * checks whether this messageId has been seen before and adds this * messageId to the list * * @param id * @return true if the message is a duplicate */ public boolean isDuplicate(String id) { boolean answer = false; String seed = IdGenerator.getSeedFromId(id); if (seed != null) { BitArrayBin bab = map.get(seed); if (bab == null) { bab = new BitArrayBin(auditDepth); map.put(seed, bab); modified = true; } long index = IdGenerator.getSequenceFromId(id); if (index >= 0) { answer = bab.setBit(index, true); modified = true; } } return answer; }
/** * Checks if this messageId has been seen before * * @param id * @return true if the message is a duplicate */ public boolean isDuplicate(final MessageId id) { boolean answer = false; if (id != null) { ProducerId pid = id.getProducerId(); if (pid != null) { BitArrayBin bab = map.get(pid.toString()); if (bab == null) { bab = new BitArrayBin(auditDepth); map.put(pid.toString(), bab); modified = true; } answer = bab.setBit(id.getProducerSequenceId(), true); } } return answer; }
/** * Check the MessageId is in order * * @param id * * @return true if the id is in order */ public boolean isInOrder(final MessageId id) { boolean answer = false; if (id != null) { ProducerId pid = id.getProducerId(); if (pid != null) { BitArrayBin bab = map.get(pid.toString()); if (bab == null) { bab = new BitArrayBin(auditDepth); map.put(pid.toString(), bab); modified = true; } answer = bab.isInOrder(id.getProducerSequenceId()); } } return answer; }
private BooleanExpression getExpression(String selector) throws Exception{ BooleanExpression result; synchronized(expressionCache){ result = expressionCache.get(selector); if (result == null){ result = compileSelector(selector); expressionCache.put(selector,result); } } return result; }
private BooleanExpression getExpression(String selector) throws Exception{ BooleanExpression result; synchronized(expressionCache){ result = expressionCache.get(selector); if (result == null){ result = compileSelector(selector); expressionCache.put(selector,result); } } return result; }
public long getLastSeqId(ProducerId id) { long result = -1; BitArrayBin bab = map.get(id.toString()); if (bab != null) { result = bab.getLastSetIndex(); } return result; }
public long getLastSeqId(ProducerId id) { long result = -1; BitArrayBin bab = map.get(id.toString()); if (bab != null) { result = bab.getLastSetIndex(); } return result; }
protected ActiveMQDestination getQueueConsumersWildcard(ActiveMQDestination original) { ActiveMQQueue queue; synchronized (cache) { queue = cache.get(original); if (queue == null) { queue = new ActiveMQQueue(prefix + original.getPhysicalName() + postfix); cache.put(original, queue); } } return queue; } }
public void rollback(final String id) { String seed = IdGenerator.getSeedFromId(id); if (seed != null) { BitArrayBin bab = map.get(seed); if (bab != null) { long index = IdGenerator.getSequenceFromId(id); bab.setBit(index, false); modified = true; } } }
public void rollback(final String id) { String seed = IdGenerator.getSeedFromId(id); if (seed != null) { BitArrayBin bab = map.get(seed); if (bab != null) { long index = IdGenerator.getSequenceFromId(id); bab.setBit(index, false); modified = true; } } }
synchronized public void onSend(ProducerBrokerExchange producerExchange, Message message) { ActiveMQDestination dest = message.getDestination(); Traffic traffic = trafficPerDestination.get(dest); if( traffic == null ) { traffic = new Traffic(); trafficPerDestination.put(dest, traffic); } traffic.messages += 1; traffic.bytes += message.getSize(); }