You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ace.apache.org by ma...@apache.org on 2011/09/14 13:17:31 UTC
svn commit: r1170533 -
/incubator/ace/trunk/ace-log/src/main/java/org/apache/ace/log/LogEvent.java
Author: marrs
Date: Wed Sep 14 11:17:30 2011
New Revision: 1170533
URL: http://svn.apache.org/viewvc?rev=1170533&view=rev
Log:
Added a new constructor for cloning an existing event with a different target ID
Modified:
incubator/ace/trunk/ace-log/src/main/java/org/apache/ace/log/LogEvent.java
Modified: incubator/ace/trunk/ace-log/src/main/java/org/apache/ace/log/LogEvent.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-log/src/main/java/org/apache/ace/log/LogEvent.java?rev=1170533&r1=1170532&r2=1170533&view=diff
==============================================================================
--- incubator/ace/trunk/ace-log/src/main/java/org/apache/ace/log/LogEvent.java (original)
+++ incubator/ace/trunk/ace-log/src/main/java/org/apache/ace/log/LogEvent.java Wed Sep 14 11:17:30 2011
@@ -28,7 +28,6 @@ import org.apache.ace.util.Codec;
* Log event from a specific gateway and log.
*/
public class LogEvent implements Comparable {
-
private final String m_gatewayID;
private final long m_logID;
private final long m_id;
@@ -36,8 +35,7 @@ public class LogEvent implements Compara
private final int m_type;
private final Dictionary m_properties;
- public LogEvent(String gatewayID, long logID, long id, long time,
- int type, Dictionary properties) {
+ public LogEvent(String gatewayID, long logID, long id, long time, int type, Dictionary properties) {
m_gatewayID = gatewayID;
m_logID = logID;
m_id = id;
@@ -46,6 +44,10 @@ public class LogEvent implements Compara
m_properties = properties;
}
+ public LogEvent(String gatewayID, LogEvent source) {
+ this(gatewayID, source.getLogID(), source.getID(), source.getTime(), source.getType(), source.getProperties());
+ }
+
public LogEvent(String representation) {
try {
StringTokenizer st = new StringTokenizer(representation, ",");