Bug 5153: Add timestamp to TransactionIdentifier
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / identifiers / ChainedTransactionIdentifier.java
index 78f68f6204fdb9a946fa37ac47b37729b528a469..4753437d2501ef535cb7babb9a891bbd64c0d608 100644 (file)
@@ -25,8 +25,9 @@ public class ChainedTransactionIdentifier extends TransactionIdentifier {
         stringRepresentation = Suppliers.memoize(new Supplier<String>() {
             @Override
             public String get() {
-                return new StringBuilder(chainId.toString().length() + TX_SEPARATOR.length() + 10).
-                        append(chainId).append(TX_SEPARATOR).append(getCounter()).toString();
+                return new StringBuilder(chainId.toString().length() + TX_SEPARATOR.length() + 21).
+                        append(chainId).append(TX_SEPARATOR).append(getCounter()).append('-').
+                        append(getTimestamp()).toString();
             }
         });
     }