You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2015/05/28 17:20:54 UTC

[1/2] activemq-artemis git commit: This closes #2 print-data change

Repository: activemq-artemis
Updated Branches:
  refs/heads/master eb4355a62 -> 043909bde


This closes #2 print-data change


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/043909bd
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/043909bd
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/043909bd

Branch: refs/heads/master
Commit: 043909bded04e8af39de994484a316cd220ba537
Parents: eb4355a fbe0508
Author: Clebert Suconic <cl...@apache.org>
Authored: Thu May 28 11:20:37 2015 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Thu May 28 11:20:37 2015 -0400

----------------------------------------------------------------------
 .../artemis/core/server/impl/ServerMessageImpl.java  | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[2/2] activemq-artemis git commit: Adding timestamp to print-data

Posted by cl...@apache.org.
Adding timestamp to print-data

This is a simple change to add the timestamp on toString which will appear on print-data


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/fbe05083
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/fbe05083
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/fbe05083

Branch: refs/heads/master
Commit: fbe0508350d6ae6d390b9c1287deb031320f67cd
Parents: eb4355a
Author: Clebert Suconic <cl...@apache.org>
Authored: Wed May 27 09:55:14 2015 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Thu May 28 11:20:37 2015 -0400

----------------------------------------------------------------------
 .../artemis/core/server/impl/ServerMessageImpl.java  | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fbe05083/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerMessageImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerMessageImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerMessageImpl.java
index ff14ecf..870e922 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerMessageImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerMessageImpl.java
@@ -319,10 +319,23 @@ public class ServerMessageImpl extends MessageImpl implements ServerMessage
    public String toString()
    {
       return "ServerMessage[messageID=" + messageID + ",durable=" + isDurable() + ",userID=" + getUserID() + ",priority=" + this.getPriority() + ", bodySize=" + this.getBodyBufferCopy().capacity() +
-         ",expiration=" + (this.getExpiration() != 0 ? new java.util.Date(this.getExpiration()) : 0) +
+         ", timestamp=" + toDate(getTimestamp()) + ",expiration=" + toDate(getExpiration()) +
          ", durable=" + durable + ", address=" + getAddress() + ",properties=" + properties.toString() + "]@" + System.identityHashCode(this);
    }
 
+   private static String toDate(long timestamp)
+   {
+      if (timestamp == 0)
+      {
+         return "0";
+      }
+      else
+      {
+         return new java.util.Date(timestamp).toString();
+      }
+
+   }
+
    public InputStream getBodyInputStream()
    {
       return null;