001: /*
002: * <copyright>
003: *
004: * Copyright 1997-2004 BBNT Solutions, LLC
005: * under sponsorship of the Defense Advanced Research Projects
006: * Agency (DARPA).
007: *
008: * You can redistribute this software and/or modify it under the
009: * terms of the Cougaar Open Source License as published on the
010: * Cougaar Open Source Website (www.cougaar.org).
011: *
012: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
013: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
014: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
015: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
016: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
017: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
018: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
019: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
020: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
021: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
022: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
023: *
024: * </copyright>
025: */
026:
027: package org.cougaar.core.qos.gossip;
028:
029: /**
030: * Gossip overhead statisics record collected by the
031: * GossipStatisicsServiceAspect and displayed by the GossipStatiticsServlet.
032: */
033: public class GossipTrafficRecord {
034: int requests_sent;
035: int requests_rcvd;
036: int values_sent;
037: int values_rcvd;
038: int msg_with_gossip_sent;
039: int msg_with_gossip_rcvd;
040: int msg_sent;
041: int msg_rcvd;
042:
043: GossipTrafficRecord() {
044: }
045:
046: GossipTrafficRecord(GossipTrafficRecord other) {
047: this .requests_sent = other.requests_sent;
048: this .requests_rcvd = other.requests_rcvd;
049: this .values_sent = other.values_sent;
050: this .values_rcvd = other.values_rcvd;
051: this .msg_with_gossip_sent = other.msg_with_gossip_sent;
052: this .msg_with_gossip_rcvd = other.msg_with_gossip_rcvd;
053: this .msg_sent = other.msg_sent;
054: this .msg_rcvd = other.msg_rcvd;
055:
056: }
057:
058: public String toString() {
059: StringBuffer buf = new StringBuffer();
060: buf.append("<requests_sent=");
061: buf.append(requests_sent);
062: buf.append(" requests_rcvd=");
063: buf.append(requests_rcvd);
064: buf.append(" values_sent=");
065: buf.append(values_sent);
066: buf.append(" values_rcvd=");
067: buf.append(values_rcvd);
068: buf.append(" msg_with_gossip_sent=");
069: buf.append(msg_with_gossip_sent);
070: buf.append(" msg_with_gossip_rcvd=");
071: buf.append(msg_with_gossip_rcvd);
072: buf.append(" msg_with_gossip_sent=");
073: buf.append(msg_sent);
074: buf.append(" msg_rcvd=");
075: buf.append(msg_rcvd);
076: buf.append('>');
077: return buf.toString();
078: }
079:
080: public int getRequestsSent() {
081: return requests_sent;
082: }
083:
084: public int getRequestsReceived() {
085: return requests_rcvd;
086: }
087:
088: public int getValuesSent() {
089: return values_sent;
090: }
091:
092: public int getValuesReceived() {
093: return values_rcvd;
094: }
095:
096: public int getMessagesWithGossipSent() {
097: return msg_with_gossip_sent;
098: }
099:
100: public int getMessagesWithGossipReceived() {
101: return msg_with_gossip_rcvd;
102: }
103:
104: public int getMessagesSent() {
105: return msg_sent;
106: }
107:
108: public int getMessagesReceived() {
109: return msg_rcvd;
110: }
111:
112: }
|