public String getNodeID() { return nodeUUID.toString(); }
public String getNodeId() { return nodeUUID.toString(); }
/** * @param generateUUID */ protected void setUUID(UUID generateUUID) { synchronized (nodeIDGuard) { uuid = generateUUID; nodeID = new SimpleString(uuid.toString()); } }
public String getJMSMessageID() { if (msgID == null) { UUID uid = message.getUserID(); msgID = uid == null ? null : "ID:" + uid.toString(); } return msgID; }
public final String generateStringUUID() { byte[] address = getAddressBytes(); if (address == null) { return java.util.UUID.randomUUID().toString(); } else { return generateTimeBasedUUID(address).toString(); } }
public String generateStringUUID() { byte[] address = getAddressBytes(); if (address == null) { return java.util.UUID.randomUUID().toString(); } else { return generateTimeBasedUUID(address).toString(); } }
public String getLastSentMessageID(String address) { Pair<UUID, AtomicLong> value = targetAddressInfos.get(SimpleString.toSimpleString(address)); if (value != null) { return value.getA().toString(); } else { return null; } }
public String getLastSentMessageID(String address) { Pair<UUID, AtomicLong> value = targetAddressInfos.get(SimpleString.toSimpleString(address)); if (value != null) { return value.getA().toString(); } else { return null; } }
private void readNodeId() throws Exception { ByteBuffer id = ByteBuffer.allocateDirect(16); int read = channel.read(id, 3); if (read != 16) { throw new IllegalStateException("live server did not write id to file"); } else { byte[] bytes = new byte[16]; id.position(0); id.get(bytes); uuid = new UUID(UUID.TYPE_TIME_BASED, bytes); nodeID = new SimpleString(uuid.toString()); } }
@Override public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append(msg.isLargeMessage() ? "LargeMessage(" : "Message("); buffer.append("messageID=" + msg.getMessageID()); if (msg.getUserID() != null) { buffer.append(";userMessageID=" + msg.getUserID().toString()); } buffer.append(";msg=" + msg.toString()); return buffer.toString(); }
public Map<String, Object> toMap() { Map<String, Object> map = new HashMap<String, Object>(); map.put("messageID", messageID); if (userID != null) { map.put("userID", "ID:" + userID.toString()); } map.put("address", address.toString()); map.put("type", type); map.put("durable", durable); map.put("expiration", expiration); map.put("timestamp", timestamp); map.put("priority", priority); for (SimpleString propName : properties.getPropertyNames()) { map.put(propName.toString(), properties.getProperty(propName)); } return map; }
public Map<String, Object> toMap() { Map<String, Object> map = new HashMap<String, Object>(); map.put("messageID", messageID); if (userID != null) { map.put("userID", "ID:" + userID.toString()); } map.put("address", address.toString()); map.put("type", type); map.put("durable", durable); map.put("expiration", expiration); map.put("timestamp", timestamp); map.put("priority", priority); for (SimpleString propName : properties.getPropertyNames()) { map.put(propName.toString(), properties.getProperty(propName)); } return map; }
private void createNodeId() throws Exception { ByteBuffer id = ByteBuffer.allocateDirect(16); int read = channel.read(id, 3); if (read != 16) { uuid = UUIDGenerator.getInstance().generateUUID(); nodeID = new SimpleString(uuid.toString()); id.put(uuid.asBytes(), 0, 16); id.position(0); channel.write(id, 3); channel.force(true); } else { byte[] bytes = new byte[16]; id.position(0); id.get(bytes); uuid = new UUID(UUID.TYPE_TIME_BASED, bytes); nodeID = new SimpleString(uuid.toString()); } }
public synchronized void start() throws Exception { if (started) { return; } started = true; stopping = false; activate(); if (notificationService != null) { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(new SimpleString("name"), name); Notification notification = new Notification(nodeUUID.toString(), CoreNotificationType.BRIDGE_STARTED, props); notificationService.sendNotification(notification); } }
Notification notification = new Notification(nodeUUID.toString(), CoreNotificationType.BRIDGE_STOPPED, props); try
.getChannel(0, -1) .send(new NodeAnnounceMessage(System.currentTimeMillis(), nodeUUID.toString(), true, connector,
public synchronized void start() throws Exception { if (started) { return; } started = true; stopping = false; if (activated) { activate(); } if (notificationService != null) { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(new SimpleString("name"), name); Notification notification = new Notification(nodeUUID.toString(), NotificationType.BRIDGE_STARTED, props); notificationService.sendNotification(notification); } }
public void pause() throws Exception { if (log.isDebugEnabled()) { log.debug("Bridge " + this.name + " being paused"); } executor.execute(new PauseRunnable()); if (notificationService != null) { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(new SimpleString("name"), name); Notification notification = new Notification(nodeUUID.toString(), NotificationType.BRIDGE_STOPPED, props); try { notificationService.sendNotification(notification); } catch (Exception e) { BridgeImpl.log.warn("unable to send notification when broadcast group is stopped", e); } } }
public void pause() throws Exception { if (HornetQServerLogger.LOGGER.isDebugEnabled()) { HornetQServerLogger.LOGGER.debug("Bridge " + this.name + " being paused"); } executor.execute(new PauseRunnable()); if (notificationService != null) { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(new SimpleString("name"), name); Notification notification = new Notification(nodeUUID.toString(), CoreNotificationType.BRIDGE_STOPPED, props); try { notificationService.sendNotification(notification); } catch (Exception e) { HornetQServerLogger.LOGGER.notificationBridgeStoppedError(e); } } }
BroadcastGroupImpl group = new BroadcastGroupImpl(nodeUUID.toString(), config.getName(), localAddress,