|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.solr.update.TransactionLog
public class TransactionLog
Log Format: List{Operation, Version, ...} ADD, VERSION, DOC DELETE, VERSION, ID_BYTES DELETE_BY_QUERY, VERSION, String TODO: keep two files, one for [operation, version, id] and the other for the actual document data. That way we could throw away document log files more readily while retaining the smaller operation log files longer (and we can retrieve the stored fields from the latest documents from the index). This would require keeping all source fields stored of course. This would also allow to not log document data for requests with commit=true in them (since we know that if the request succeeds, all docs will be committed)
Nested Class Summary | |
---|---|
class |
TransactionLog.FSReverseReader
|
class |
TransactionLog.LogCodec
|
class |
TransactionLog.LogReader
|
class |
TransactionLog.ReverseReader
|
Field Summary | |
---|---|
protected boolean |
deleteOnClose
|
static String |
END_MESSAGE
|
static org.slf4j.Logger |
log
|
Constructor Summary | |
---|---|
protected |
TransactionLog()
|
Method Summary | |
---|---|
protected void |
addGlobalStrings(Collection<String> strings)
|
protected void |
close()
|
void |
decref()
|
protected void |
endRecord(long startRecordPosition)
|
boolean |
endsWithCommit()
|
void |
finish(UpdateLog.SyncLevel syncLevel)
|
void |
forceClose()
|
TransactionLog.LogReader |
getReader(long startingPos)
Returns a reader that can be used while a log is still in use. |
TransactionLog.ReverseReader |
getReverseReader()
Returns a single threaded reverse reader |
void |
incref()
|
Object |
lookup(long pos)
|
int |
numRecords()
Returns the number of records in the log (currently includes the header and an optional commit). |
long |
position()
returns the current position in the log file |
void |
rollback(long pos)
|
long |
snapshot()
takes a snapshot of the current position and number of records for later possible rollback, and returns the position |
String |
toString()
|
boolean |
try_incref()
|
long |
write(AddUpdateCommand cmd,
int flags)
|
long |
writeCommit(CommitUpdateCommand cmd,
int flags)
|
long |
writeData(Object o)
|
long |
writeDelete(DeleteUpdateCommand cmd,
int flags)
|
long |
writeDeleteByQuery(DeleteUpdateCommand cmd,
int flags)
|
protected void |
writeLogHeader(TransactionLog.LogCodec codec)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static org.slf4j.Logger log
public static final String END_MESSAGE
protected volatile boolean deleteOnClose
Constructor Detail |
---|
protected TransactionLog()
Method Detail |
---|
public int numRecords()
public boolean endsWithCommit() throws IOException
IOException
public long snapshot()
public void rollback(long pos) throws IOException
IOException
public long writeData(Object o)
protected void addGlobalStrings(Collection<String> strings)
protected void writeLogHeader(TransactionLog.LogCodec codec) throws IOException
IOException
protected void endRecord(long startRecordPosition) throws IOException
IOException
public long write(AddUpdateCommand cmd, int flags)
public long writeDelete(DeleteUpdateCommand cmd, int flags)
public long writeDeleteByQuery(DeleteUpdateCommand cmd, int flags)
public long writeCommit(CommitUpdateCommand cmd, int flags)
public Object lookup(long pos)
public void incref()
public boolean try_incref()
public void decref()
public long position()
public void finish(UpdateLog.SyncLevel syncLevel)
protected void close()
public void forceClose()
public String toString()
toString
in class Object
public TransactionLog.LogReader getReader(long startingPos)
public TransactionLog.ReverseReader getReverseReader() throws IOException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |