Package org.apache.solr.update
Class CdcrTransactionLog
- java.lang.Object
-
- org.apache.solr.update.TransactionLog
-
- org.apache.solr.update.CdcrTransactionLog
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
@Deprecated public class CdcrTransactionLog extends TransactionLog
Deprecated.since 8.6ExtendsTransactionLog
to:- reopen automatically the output stream if its reference count reached 0. This is achieved by extending
methods
incref()
,close()
andreopenOutputStream()
. - encode the number of records in the tlog file in the last commit record. The number of records will be
decoded and reuse if the tlog file is reopened. This is achieved by extending the constructor, and the
methods
writeCommit(CommitUpdateCommand)
andgetReader(long)
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
CdcrTransactionLog.CdcrLogReader
Deprecated.-
Nested classes/interfaces inherited from class org.apache.solr.update.TransactionLog
TransactionLog.FSReverseReader, TransactionLog.LogCodec, TransactionLog.LogReader, TransactionLog.ReverseReader, TransactionLog.SortedLogReader
-
-
Field Summary
-
Fields inherited from class org.apache.solr.update.TransactionLog
deleteOnClose, END_MESSAGE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
Deprecated.TransactionLog.LogReader
getReader(long startingPos)
Deprecated.Returns a reader that can be used while a log is still in use.void
incref()
Deprecated.int
numRecords()
Deprecated.Returns the number of records in the log (currently includes the header and an optional commit).boolean
try_incref()
Deprecated.Modified to act likeincref()
in order to be compatible withUpdateLog.recoverFromLog()
.long
write(AddUpdateCommand cmd, long prevPointer)
Deprecated.Writes an add update command to the transaction log.long
writeCommit(CommitUpdateCommand cmd)
Deprecated.long
writeDelete(DeleteUpdateCommand cmd)
Deprecated.long
writeDeleteByQuery(DeleteUpdateCommand cmd)
Deprecated.-
Methods inherited from class org.apache.solr.update.TransactionLog
addGlobalStrings, checkWriteHeader, closeOutput, decref, endRecord, endsWithCommit, finish, forceClose, getLogSize, getLogSizeFromStream, getReverseReader, getSortedReader, lookup, position, toString, write, writeData, writeLogHeader
-
-
-
-
Method Detail
-
numRecords
public int numRecords()
Deprecated.Returns the number of records in the log (currently includes the header and an optional commit).- Overrides:
numRecords
in classTransactionLog
-
write
public long write(AddUpdateCommand cmd, long prevPointer)
Deprecated.Description copied from class:TransactionLog
Writes an add update command to the transaction log. This should be called only for writing in-place updates, or else pass -1 as the prevPointer.- Overrides:
write
in classTransactionLog
- Parameters:
cmd
- The add update command to be writtenprevPointer
- The pointer in the transaction log which this update depends on (applicable for in-place updates)- Returns:
- Returns the position pointer of the written update command
-
writeDelete
public long writeDelete(DeleteUpdateCommand cmd)
Deprecated.- Overrides:
writeDelete
in classTransactionLog
-
writeDeleteByQuery
public long writeDeleteByQuery(DeleteUpdateCommand cmd)
Deprecated.- Overrides:
writeDeleteByQuery
in classTransactionLog
-
writeCommit
public long writeCommit(CommitUpdateCommand cmd)
Deprecated.- Overrides:
writeCommit
in classTransactionLog
-
getReader
public TransactionLog.LogReader getReader(long startingPos)
Deprecated.Returns a reader that can be used while a log is still in use. Currently only *one* LogReader may be outstanding, and that log may only be used from a single thread.- Overrides:
getReader
in classTransactionLog
-
incref
public void incref()
Deprecated.- Overrides:
incref
in classTransactionLog
-
try_incref
public boolean try_incref()
Deprecated.Modified to act likeincref()
in order to be compatible withUpdateLog.recoverFromLog()
. Otherwise, we would have to duplicate the methodUpdateLog.recoverFromLog()
inCdcrUpdateLog
and change the callif (!ll.try_incref()) continue;
toincref();
.- Overrides:
try_incref
in classTransactionLog
-
close
public void close()
Deprecated.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classTransactionLog
-
-