public int compare(CorrelationKey o1, CorrelationKey o2) { if( o1 == null || o2 == null ) { return 0; } // used only in sorting the correlation keys in the CorrelationKeySet; does not matter with the values return o1.getCorrelationSetName().compareTo(o2.getCorrelationSetName()); } }
/** * Adds a correlation key to this correlation key set. If a correlation key with the same correlation set id * already exists, the old one is replaced with the given new one. * * @param ck a correlation key to add * @return returns this correlation key set */ public CorrelationKeySet add(CorrelationKey ck) { for( CorrelationKey key : correlationKeys ) { if( key.getCorrelationSetName().equals(ck.getCorrelationSetName()) ) { correlationKeys.remove(ck); break; } } correlationKeys.add(ck); return this; }
/** * Checks if this correlation key set contains the opaque correlation key as the only key * in this correlation key set. * * @return returns true if the correlation key set is opaque */ public boolean isOpaque() { return correlationKeys.size() == 1 && correlationKeys.iterator().next().getCorrelationSetName().equals("-1"); }
for( CorrelationKey ckey : correlationKeys ) { if( ckey.getCorrelationSetName().equals("-1") ) { opaqueKey = ckey; } else {
newKeySet.add(new CorrelationKey(""+selCKey.getCorrelationSetName(), selCKey.getValues())); Selector newSelector = new Selector(sel.idx, sel.plinkInstance, sel.opName, sel.oneWay, sel.messageExchangeId, newKeySet, "one"); newSelector.correlationKey = new CorrelationKey(""+selCKey.getCorrelationSetName(), selCKey.getValues()); newSelectors[index++] = newSelector;
if (ckey != null) { __log.debug("Correlation set id " + cset.getCorrelationSetId() + " key " + ckey); Integer ckeyInt = asInt(ckey.getCorrelationSetName()); if (ckeyInt != null) { OScope.CorrelationSet ocset = findCorrelationById(ckeyInt, registeredProcesses, cset.getProcess().getProcessId()); CorrelationKey oldKey = routeDAO.getCorrelationKey(); if (oldKey != null) { Integer ckeyInt = asInt(oldKey.getCorrelationSetName()); if (ckeyInt != null) { OScope.CorrelationSet ocset = findCorrelationById(ckeyInt, registeredProcesses, process.getConf().getProcessId()); CorrelationKey oldKey = corrMsgDAO.getCorrelationKey(); if (oldKey != null) { Integer ckeyInt = asInt(oldKey.getCorrelationSetName()); if (ckeyInt != null) { OScope.CorrelationSet ocset = findCorrelationById(ckeyInt, registeredProcesses, process.getConf().getProcessId());