Author: pero Date: Thu Aug 30 08:25:46 2007 New Revision: 571204 URL: http://svn.apache.org/viewvc?rev=571204&view=rev Log: Made attribute createTime accessible for all DataSenders.
Modified: tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/mbeans-descriptors.xml Modified: tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java?rev=571204&r1=571203&r2=571204&view=diff ============================================================================== --- tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java (original) +++ tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java Thu Aug 30 08:25:46 2007 @@ -24,6 +24,7 @@ import java.net.Socket; import java.net.SocketAddress; import java.net.SocketException; +import java.util.Date; import org.apache.catalina.cluster.ClusterMessage; import org.apache.catalina.cluster.io.XByteBuffer; @@ -104,6 +105,11 @@ private int soTrafficClass = 0x04 | 0x08 | 0x010; /** + * createTime + */ + protected long createTime ; + + /** * number of requests */ protected long nrOfRequests = 0; @@ -229,8 +235,9 @@ this.address = host; this.port = port; this.domain = domain; + this.createTime = System.currentTimeMillis() ; if (log.isDebugEnabled()) - log.debug(sm.getString("IDataSender.create",address, new Integer(port))); + log.debug(sm.getString("IDataSender.create",address, new Integer(port), new Date(createTime))); } public DataSender(String domain,InetAddress host, int port, SenderState state) { @@ -248,6 +255,13 @@ return (info); + } + + /** + * @return the createTime + */ + public long getCreateTime() { + return createTime; } /** Modified: tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties?rev=571204&r1=571203&r2=571204&view=diff ============================================================================== --- tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties (original) +++ tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties Thu Aug 30 08:25:46 2007 @@ -30,7 +30,7 @@ IDataSender.ack.wrong=Missing correct ACK after 10 bytes read at local port [{0}:{1,number,integer}] IDataSender.closeSocket=Sender close socket to [{0}:{1,number,integer}] (close count {2,number,integer}) IDataSender.connect=Sender connect to [{0}:{1,number,integer}] (connect count {2,number,integer}) -IDataSender.create=Create sender [{0}:{1,number,integer}] +IDataSender.create=Create sender [{0}:{1,number,integer}] at [{2,date}] IDataSender.disconnect=Sender disconnect from [{0}:{1,number,integer}] (disconnect count {2,number,integer}) IDataSender.message.disconnect=Message transfered: Sender can't disconnect from [{0}:{1,number,integer}] IDataSender.message.create=Message transfered: Sender can't create current socket [{0}:{1,number,integer}] Modified: tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/mbeans-descriptors.xml URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/mbeans-descriptors.xml?rev=571204&r1=571203&r2=571204&view=diff ============================================================================== --- tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/mbeans-descriptors.xml (original) +++ tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/mbeans-descriptors.xml Thu Aug 30 08:25:46 2007 @@ -625,6 +625,10 @@ description="counts all successfully sended messages" type="long" writeable="false"/> + <attribute name="createTime" + description="create time of sender" + type="long" + writeable="false"/> <operation name="connect" description="connect to other replication node" impact="ACTION" @@ -877,6 +881,10 @@ description="queue remove wait time (queue thread waits) (msec)" type="long" writeable="false"/> + <attribute name="createTime" + description="create time of sender" + type="long" + writeable="false"/> <operation name="connect" description="connect to other replication node" impact="ACTION" @@ -1003,6 +1011,10 @@ description="counts disconnects" type="long" writeable="false"/> + <attribute name="createTime" + description="create time of sender" + type="long" + writeable="false"/> <operation name="connect" description="start Queue to connect to ohter replication node" impact="ACTION" @@ -1190,6 +1202,10 @@ writeable="false"/> <attribute name="dataFailureCounter" description="counts data send failures" + type="long" + writeable="false"/> + <attribute name="createTime" + description="create time of sender" type="long" writeable="false"/> <operation name="connect" --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]