/** * @return the number of times per second that the counter is incrementing * since the last reset. */ public double getFrequency() { double count = getCount(); double time = System.currentTimeMillis() - getStartTime(); return count * 1000.0 / time; }
public PollCountStatisticImpl(PollCountStatisticImpl parent, String name, String description) { this(name, description); setParent(parent); }
public ConnectorStatistics() { enqueues = new CountStatisticImpl("enqueues", "The number of messages that have been sent to the destination"); dequeues = new CountStatisticImpl("dequeues", "The number of messages that have been dispatched from the destination"); consumers = new CountStatisticImpl("consumers", "The number of consumers that that are subscribing to messages from the destination"); messages = new CountStatisticImpl("messages", "The number of messages that that are being held by the destination"); messagesCached = new PollCountStatisticImpl("messagesCached", "The number of messages that are held in the destination's memory cache"); addStatistic("enqueues", enqueues); addStatistic("dequeues", dequeues); addStatistic("consumers", consumers); addStatistic("messages", messages); addStatistic("messagesCached", messagesCached); }
public void setParent(PollCountStatisticImpl parent) { if (this.parent != null) { this.parent.removeChild(this); } this.parent = parent; if (this.parent != null) { this.parent.addChild(this); } }
public synchronized long getCount() { if (children == null) { return 0; } long count = 0; for (Iterator<PollCountStatisticImpl> iter = children.iterator(); iter.hasNext();) { PollCountStatisticImpl child = iter.next(); count += child.getCount(); } return count; }
public void setEnabled(boolean enabled) { super.setEnabled(enabled); enqueues.setEnabled(enabled); dequeues.setEnabled(enabled); consumers.setEnabled(enabled); messages.setEnabled(enabled); messagesCached.setEnabled(enabled); }
protected void appendFieldDescription(StringBuffer buffer) { buffer.append(" count: "); buffer.append(Long.toString(getCount())); super.appendFieldDescription(buffer); }
public void setParent(PollCountStatisticImpl parent) { if (this.parent != null) { this.parent.removeChild(this); } this.parent = parent; if (this.parent != null) { this.parent.addChild(this); } }
public void setEnabled(boolean enabled) { super.setEnabled(enabled); enqueues.setEnabled(enabled); dispatched.setEnabled(enabled); dequeues.setEnabled(enabled); forwards.setEnabled(enabled); inflight.setEnabled(enabled); expired.setEnabled(true); consumers.setEnabled(enabled); producers.setEnabled(enabled); messages.setEnabled(enabled); messagesCached.setEnabled(enabled); processTime.setEnabled(enabled); blockedSends.setEnabled(enabled); blockedTime.setEnabled(enabled); messageSize.setEnabled(enabled); }
/** * @return the average time period that elapses between counter increments * since the last reset. */ public double getPeriod() { double count = getCount(); if (count == 0) { return 0; } double time = System.currentTimeMillis() - getStartTime(); return time / (count * 1000.0); }
/** * @return the number of messages cached in memory by this destination */ public long getMessagesCached() { return destination.getDestinationStatistics().getMessagesCached().getCount(); }
public void setParent(ConnectorStatistics parent) { if (parent != null) { enqueues.setParent(parent.enqueues); dequeues.setParent(parent.dequeues); consumers.setParent(parent.consumers); messagesCached.setParent(parent.messagesCached); messages.setParent(parent.messages); } else { enqueues.setParent(null); dequeues.setParent(null); consumers.setParent(null); messagesCached.setParent(null); messages.setParent(null); } }
public void setParent(PollCountStatisticImpl parent) { if (this.parent != null) { this.parent.removeChild(this); } this.parent = parent; if (this.parent != null) { this.parent.addChild(this); } }
public void setEnabled(boolean enabled) { super.setEnabled(enabled); enqueues.setEnabled(enabled); dequeues.setEnabled(enabled); consumers.setEnabled(enabled); messages.setEnabled(enabled); messagesCached.setEnabled(enabled); }
messages = new CountStatisticImpl("messages", "The number of messages that that are being held by the destination"); messages.setDoReset(false); messagesCached = new PollCountStatisticImpl("messagesCached", "The number of messages that are held in the destination's memory cache"); processTime = new TimeStatisticImpl("processTime", "information around length of time messages are held by a destination"); blockedSends = new CountStatisticImpl("blockedSends", "number of messages that have to wait for flow control");
/** * @return the number of times per second that the counter is incrementing * since the last reset. */ public double getFrequency() { double count = getCount(); double time = System.currentTimeMillis() - getStartTime(); return count * 1000.0 / time; }
public long getMessagesCached() { return destination.getDestinationStatistics().getMessagesCached().getCount(); }
consumers.setParent(parent.consumers); producers.setParent(parent.producers); messagesCached.setParent(parent.messagesCached); messages.setParent(parent.messages); processTime.setParent(parent.processTime); consumers.setParent(null); producers.setParent(null); messagesCached.setParent(null); messages.setParent(null); processTime.setParent(null);
public void setParent(PollCountStatisticImpl parent) { if (this.parent != null) { this.parent.removeChild(this); } this.parent = parent; if (this.parent != null) { this.parent.addChild(this); } }
public void setEnabled(boolean enabled) { super.setEnabled(enabled); enqueues.setEnabled(enabled); dequeues.setEnabled(enabled); consumers.setEnabled(enabled); messages.setEnabled(enabled); messagesCached.setEnabled(enabled); }