ISSUE #181: Enable LogRecord ByteBuf based constructor public
Descriptions of the changes in this PR:
change LogRecord ByteBuf based constructor to public
Author: Arvin <arvindevel@gmail.com>
Reviewers: Sijie Guo <sijie@apache.org>
This closes #182 from ArvinDevel/issue_181, closes #181
diff --git a/distributedlog-protocol/src/main/java/org/apache/distributedlog/LogRecord.java b/distributedlog-protocol/src/main/java/org/apache/distributedlog/LogRecord.java
index 7a199f6..5d666a0 100644
--- a/distributedlog-protocol/src/main/java/org/apache/distributedlog/LogRecord.java
+++ b/distributedlog-protocol/src/main/java/org/apache/distributedlog/LogRecord.java
@@ -171,12 +171,11 @@
}
/**
- * Used by {@link LogRecordWithDLSN} to construct a log record read by readers.
- *
+ * Construct a log record with <i>txid</i> and ByteBuf <i>payload</i>.
* @param txid transaction id
* @param payload playload
*/
- protected LogRecord(long txid, ByteBuf payload) {
+ public LogRecord(long txid, ByteBuf payload) {
this.txid = txid;
// Need to make a copy since the passed payload is using a ref-count buffer that we don't know when could
// release, since the record is passed to the user. Also, the passed ByteBuf is coming from network and is