class LogInputFile extends LogFile
LogOutputFile.LogOutputFile| Modifier and Type | Class and Description |
|---|---|
private static class |
LogInputFile.LogInputFileIterator
The implementation of
Iterator returned by
LogInputStream.logs. |
| Modifier and Type | Field and Description |
|---|---|
private File |
file |
private static long |
intBytes |
private static Logger |
logger
Logger for logging persistent store related information
|
ABORT_OP, baseDir, baseFile, BATCH_TAKE_OP, BATCH_WRITE_OP, BOOT_OP, CANCEL_OP, COMMIT_OP, JOINSTATE_OP, LOG_TYPE, LOG_VERSION, NOTIFIED_OP, PREPARE_OP, REGISTER_OP, RENEW_OP, TAKE_OP, UUID_OP, WRITE_OP| Modifier | Constructor and Description |
|---|---|
private |
LogInputFile(LogFile desc,
File path)
Create a new
LogInputFile. |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
consume(BackEnd opOn)
Consume the input file, invoking the appropriate operations on
the given object.
|
private void |
failure(String message)
Report a failure consuming the log file and throw an
InternalSpaceException containing message. |
private void |
failure(String message,
Exception e)
Report a exception while consuming the log file and throw an
InternalSpaceException containing message. |
(package private) void |
finished()
This log has been successfully drained, and committed -- it can be
removed.
|
(package private) static Iterator |
logs(String basePath,
boolean returnAll)
Return an
Iterator that will loop through all
the logs that match the given basePath pattern,
interpreted as described in the matching LogStream
constructor. |
String |
toString() |
destroy, existingLogsprivate final File file
private static final long intBytes
private static final Logger logger
private LogInputFile(LogFile desc, File path) throws IOException
LogInputFile.
Note: Don't invoke this. This is needed by the
enumeration returned by logs, which is how you
should be getting LogInputFile objects. When
nested classes arrive, this constructor can be properly
protected.
IOExceptionstatic Iterator logs(String basePath, boolean returnAll) throws IOException
Iterator that will loop through all
the logs that match the given basePath pattern,
interpreted as described in the matching LogStream
constructor. If returnAll is false,
the most recent file will be left off the list. This would be
the proper value for an ongoing poll looking for completed log
files. You would specify true during recovery,
when all existing logs should be committed because no new ones
are currently being createdIOExceptionIteratorvoid consume(BackEnd opOn)
private void failure(String message)
InternalSpaceException containing message.private void failure(String message, Exception e)
InternalSpaceException containing message.void finished()
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.