Methods Summary |
---|
public synchronized void | addRequestProcessor(RequestInfo rp)
processors.add( rp );
|
public synchronized long | getBytesReceived()
long bytes=deadBytesReceived;
for( int i=0; i<processors.size(); i++ ) {
RequestInfo rp=(RequestInfo)processors.get( i );
bytes += rp.getBytesReceived();
}
return bytes;
|
public synchronized long | getBytesSent()
long bytes=deadBytesSent;
for( int i=0; i<processors.size(); i++ ) {
RequestInfo rp=(RequestInfo)processors.get( i );
bytes += rp.getBytesSent();
}
return bytes;
|
public synchronized int | getErrorCount()
int requestCount=deadErrorCount;
for( int i=0; i<processors.size(); i++ ) {
RequestInfo rp=(RequestInfo)processors.get( i );
requestCount += rp.getErrorCount();
}
return requestCount;
|
public synchronized long | getMaxTime()
long maxTime=deadMaxTime;
for( int i=0; i<processors.size(); i++ ) {
RequestInfo rp=(RequestInfo)processors.get( i );
if( maxTime < rp.getMaxTime() ) maxTime=rp.getMaxTime();
}
return maxTime;
|
public synchronized long | getProcessingTime()
long time=deadProcessingTime;
for( int i=0; i<processors.size(); i++ ) {
RequestInfo rp=(RequestInfo)processors.get( i );
time += rp.getProcessingTime();
}
return time;
|
public synchronized int | getRequestCount()
int requestCount=deadRequestCount;
for( int i=0; i<processors.size(); i++ ) {
RequestInfo rp=(RequestInfo)processors.get( i );
requestCount += rp.getRequestCount();
}
return requestCount;
|
public synchronized void | removeRequestProcessor(RequestInfo rp)
if( rp != null ) {
if( deadMaxTime < rp.getMaxTime() )
deadMaxTime = rp.getMaxTime();
deadProcessingTime += rp.getProcessingTime();
deadRequestCount += rp.getRequestCount();
deadErrorCount += rp.getErrorCount();
deadBytesReceived += rp.getBytesReceived();
deadBytesSent += rp.getBytesSent();
processors.remove( rp );
}
|
public void | resetCounters()
this.setBytesReceived(0);
this.setBytesSent(0);
this.setRequestCount(0);
this.setProcessingTime(0);
this.setMaxTime(0);
this.setErrorCount(0);
|
public synchronized void | setBytesReceived(long bytesReceived)
deadBytesReceived = bytesReceived;
for( int i=0; i<processors.size(); i++ ) {
RequestInfo rp=(RequestInfo)processors.get( i );
rp.setBytesReceived( bytesReceived );
}
|
public synchronized void | setBytesSent(long bytesSent)
deadBytesSent = bytesSent;
for( int i=0; i<processors.size(); i++ ) {
RequestInfo rp=(RequestInfo)processors.get( i );
rp.setBytesSent( bytesSent );
}
|
public synchronized void | setErrorCount(int errorCount)
deadErrorCount = errorCount;
for( int i=0; i<processors.size(); i++ ) {
RequestInfo rp=(RequestInfo)processors.get( i );
rp.setErrorCount( errorCount);
}
|
public synchronized void | setMaxTime(long maxTime)
deadMaxTime = maxTime;
for( int i=0; i<processors.size(); i++ ) {
RequestInfo rp=(RequestInfo)processors.get( i );
rp.setMaxTime(maxTime);
}
|
public synchronized void | setProcessingTime(long totalTime)
deadProcessingTime = totalTime;
for( int i=0; i<processors.size(); i++ ) {
RequestInfo rp=(RequestInfo)processors.get( i );
rp.setProcessingTime( totalTime );
}
|
public synchronized void | setRequestCount(int requestCount)
deadRequestCount = requestCount;
for( int i=0; i<processors.size(); i++ ) {
RequestInfo rp=(RequestInfo)processors.get( i );
rp.setRequestCount( requestCount );
}
|