Methods Summary |
---|
protected java.lang.Object | backingStore()
return connectionCache;
|
protected void | dprint(java.lang.String msg)
ORBUtility.dprint("CorbaInboundConnectionCacheImpl", msg);
|
public com.sun.corba.se.pept.transport.Connection | get(com.sun.corba.se.pept.transport.Acceptor acceptor)
throw wrapper.methodShouldNotBeCalled();
|
public void | put(com.sun.corba.se.pept.transport.Acceptor acceptor, com.sun.corba.se.pept.transport.Connection connection)
if (orb.transportDebugFlag) {
dprint(".put: " + acceptor + " " + connection);
}
synchronized (backingStore()) {
connectionCache.add(connection);
connection.setConnectionCache(this);
dprintStatistics();
}
|
protected void | registerWithMonitoring()
// ORB
MonitoredObject orbMO =
orb.getMonitoringManager().getRootMonitoredObject();
// REVISIT - add ORBUtil mkdir -p like operation for this.
// CONNECTION
MonitoredObject connectionMO =
orbMO.getChild(MonitoringConstants.CONNECTION_MONITORING_ROOT);
if (connectionMO == null) {
connectionMO =
MonitoringFactories.getMonitoredObjectFactory()
.createMonitoredObject(
MonitoringConstants.CONNECTION_MONITORING_ROOT,
MonitoringConstants.CONNECTION_MONITORING_ROOT_DESCRIPTION);
orbMO.addChild(connectionMO);
}
// INBOUND CONNECTION
MonitoredObject inboundConnectionMO =
connectionMO.getChild(
MonitoringConstants.INBOUND_CONNECTION_MONITORING_ROOT);
if (inboundConnectionMO == null) {
inboundConnectionMO =
MonitoringFactories.getMonitoredObjectFactory()
.createMonitoredObject(
MonitoringConstants.INBOUND_CONNECTION_MONITORING_ROOT,
MonitoringConstants.INBOUND_CONNECTION_MONITORING_ROOT_DESCRIPTION);
connectionMO.addChild(inboundConnectionMO);
}
// NODE FOR THIS CACHE
MonitoredObject thisMO =
inboundConnectionMO.getChild(getMonitoringName());
if (thisMO == null) {
thisMO =
MonitoringFactories.getMonitoredObjectFactory()
.createMonitoredObject(
getMonitoringName(),
MonitoringConstants.CONNECTION_MONITORING_DESCRIPTION);
inboundConnectionMO.addChild(thisMO);
}
LongMonitoredAttributeBase attribute;
// ATTRIBUTE
attribute = new
LongMonitoredAttributeBase(
MonitoringConstants.CONNECTION_TOTAL_NUMBER_OF_CONNECTIONS,
MonitoringConstants.CONNECTION_TOTAL_NUMBER_OF_CONNECTIONS_DESCRIPTION)
{
public Object getValue() {
return new Long(CorbaInboundConnectionCacheImpl.this.numberOfConnections());
}
};
thisMO.addAttribute(attribute);
// ATTRIBUTE
attribute = new
LongMonitoredAttributeBase(
MonitoringConstants.CONNECTION_NUMBER_OF_IDLE_CONNECTIONS,
MonitoringConstants.CONNECTION_NUMBER_OF_IDLE_CONNECTIONS_DESCRIPTION)
{
public Object getValue() {
return new Long(CorbaInboundConnectionCacheImpl.this.numberOfIdleConnections());
}
};
thisMO.addAttribute(attribute);
// ATTRIBUTE
attribute = new
LongMonitoredAttributeBase(
MonitoringConstants.CONNECTION_NUMBER_OF_BUSY_CONNECTIONS,
MonitoringConstants.CONNECTION_NUMBER_OF_BUSY_CONNECTIONS_DESCRIPTION)
{
public Object getValue() {
return new Long(CorbaInboundConnectionCacheImpl.this.numberOfBusyConnections());
}
};
thisMO.addAttribute(attribute);
|
public void | remove(com.sun.corba.se.pept.transport.Connection connection)
if (orb.transportDebugFlag) {
dprint(".remove: " + connection);
}
synchronized (backingStore()) {
connectionCache.remove(connection);
dprintStatistics();
}
|
public java.util.Collection | values()
return connectionCache;
|