protected StoredDestination getStoredDestination(KahaDestination destination, Transaction tx) throws IOException { String key = key(destination); StoredDestination rc = storedDestinations.get(key); if (rc == null) { boolean topic = destination.getType() == KahaDestination.DestinationType.TOPIC || destination.getType() == KahaDestination.DestinationType.TEMP_TOPIC; rc = loadStoredDestination(tx, key, topic); // Cache it. We may want to remove/unload destinations from the // cache that are not used for a while // to reduce memory usage. storedDestinations.put(key, rc); } return rc; }
protected StoredDestination getStoredDestination(KahaDestination destination, Transaction tx) throws IOException { String key = key(destination); StoredDestination rc = storedDestinations.get(key); if (rc == null) { boolean topic = destination.getType() == KahaDestination.DestinationType.TOPIC || destination.getType() == KahaDestination.DestinationType.TEMP_TOPIC; rc = loadStoredDestination(tx, key, topic); // Cache it. We may want to remove/unload destinations from the // cache that are not used for a while // to reduce memory usage. storedDestinations.put(key, rc); } return rc; }
private String key(KahaDestination destination) { return destination.getType().getNumber() + ":" + destination.getName(); }
protected String key(KahaDestination destination) { return destination.getType().getNumber() + ":" + destination.getName(); }
private ActiveMQDestination convert(KahaDestination commandDestination) { return convert(commandDestination.getType().getNumber(), commandDestination.getName()); }
if (messageKeys != null && messageKeys.location.compareTo(location) < 0) { LOG.warn("Duplicate message add attempt rejected. Destination: {}://{}, Message id: {}", command.getDestination().getType(), command.getDestination().getName(), command.getMessageId());
protected StoredDestination getStoredDestination(KahaDestination destination, Transaction tx) throws IOException { String key = key(destination); StoredDestination rc = storedDestinations.get(key); if (rc == null) { boolean topic = destination.getType() == KahaDestination.DestinationType.TOPIC || destination.getType() == KahaDestination.DestinationType.TEMP_TOPIC; rc = loadStoredDestination(tx, key, topic); // Cache it. We may want to remove/unload destinations from the // cache that are not used for a while // to reduce memory usage. storedDestinations.put(key, rc); } return rc; }
protected StoredDestination getStoredDestination(KahaDestination destination, Transaction tx) throws IOException { String key = key(destination); StoredDestination rc = storedDestinations.get(key); if (rc == null) { boolean topic = destination.getType() == KahaDestination.DestinationType.TOPIC || destination.getType() == KahaDestination.DestinationType.TEMP_TOPIC; rc = loadStoredDestination(tx, key, topic); // Cache it. We may want to remove/unload destinations from the // cache that are not used for a while // to reduce memory usage. storedDestinations.put(key, rc); } return rc; }
public java.lang.StringBuilder toString(java.lang.StringBuilder sb, String prefix) { if( hasType() ) { sb.append(prefix+"type: "); sb.append(getType()); sb.append("\n"); } if( hasName() ) { sb.append(prefix+"name: "); sb.append(getName()); sb.append("\n"); } return sb; }
public int hashCode() { int rc=-972308577; if (hasType()) { rc ^= ( 2622298^getType().hashCode() ); } if (hasName()) { rc ^= ( 2420395^getName().hashCode() ); } return rc; }
public int hashCode() { int rc=-972308577; if (hasType()) { rc ^= ( 2622298^getType().hashCode() ); } if (hasName()) { rc ^= ( 2420395^getName().hashCode() ); } return rc; }
public int hashCode() { int rc=-972308577; if (hasType()) { rc ^= ( 2622298^getType().hashCode() ); } if (hasName()) { rc ^= ( 2420395^getName().hashCode() ); } return rc; }
public KahaDestination mergeFrom(KahaDestination other) { if (other.hasType()) { setType(other.getType()); } if (other.hasName()) { setName(other.getName()); } return this; }
public KahaDestination mergeFrom(KahaDestination other) { if (other.hasType()) { setType(other.getType()); } if (other.hasName()) { setName(other.getName()); } return this; }
public KahaDestination mergeFrom(KahaDestination other) { if (other.hasType()) { setType(other.getType()); } if (other.hasName()) { setName(other.getName()); } return this; }
public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException { if (hasType()) { output.writeEnum(1, getType().getNumber()); } if (hasName()) { output.writeString(2, getName()); } }
public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException { if (hasType()) { output.writeEnum(1, getType().getNumber()); } if (hasName()) { output.writeString(2, getName()); } }