|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.outrigger.snaplogstore.LogFile
class LogFile
The base class for the logging file classes. This class provides the common functionality, but you should not instantiate it.
(Note -- I use protected
here as an advisory notice.
Clearly, since this is package code, all classes in the package have
access, but fields marked protected
are expected to be
used only by subclasses. Use good taste.)
LogOutputFile
,
LogInputFile
Field Summary | |
---|---|
protected static byte |
ABORT_OP
A log entry that records a transaction abort . |
protected File |
baseDir
The directory in which the log files live. |
protected String |
baseFile
The base part of the file name (e.g., "log." |
protected static byte |
BATCH_TAKE_OP
A log entry that records a batch take . |
protected static byte |
BATCH_WRITE_OP
A log entry that records a batch write . |
protected static byte |
BOOT_OP
A log entry that records a boot. |
protected static byte |
CANCEL_OP
A log entry that records a cancel . |
protected static byte |
COMMIT_OP
A log entry that records a transaction commit . |
protected static byte |
JOINSTATE_OP
A log entry that records the join state. |
(package private) static String |
LOG_TYPE
The type of log stream |
protected static int |
LOG_VERSION
The version of the log stream (the highest one known). |
private static Logger |
logger
Logger for logging persistent store related information |
protected static byte |
NOTIFIED_OP
A log entry that records a notification and new sequence number. |
protected static byte |
PREPARE_OP
A log entry that records a transaction prepare . |
protected static byte |
REGISTER_OP
A log entry that records a notify . |
protected static byte |
RENEW_OP
A log entry that records a notify . |
protected static byte |
TAKE_OP
A log entry that records a take . |
protected static byte |
UUID_OP
A log entry that records the service's Uuid . |
protected static byte |
WRITE_OP
A log entry that records a write . |
Constructor Summary | |
---|---|
protected |
LogFile(File baseDir,
String baseFile)
Create a log file with the given base directory, base file name within the directory. |
protected |
LogFile(String basePath)
Create a log file from the given template. |
Method Summary | |
---|---|
(package private) void |
destroy()
Destroy all log files associated with this stream. |
(package private) int |
existingLogs(Collection files)
Fill in a list of existing matching log files, oldest to newest, returning the highest number used as a suffix, or -1 if no files were found. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected File baseDir
protected String baseFile
"log."
for
"log.0"
, "log.1"
, ...)
static final String LOG_TYPE
protected static final int LOG_VERSION
protected static final byte BOOT_OP
protected static final byte JOINSTATE_OP
protected static final byte WRITE_OP
write
.
protected static final byte TAKE_OP
take
.
protected static final byte REGISTER_OP
notify
.
protected static final byte RENEW_OP
notify
.
protected static final byte NOTIFIED_OP
protected static final byte CANCEL_OP
cancel
.
protected static final byte PREPARE_OP
prepare
.
protected static final byte COMMIT_OP
commit
.
protected static final byte ABORT_OP
abort
.
protected static final byte UUID_OP
Uuid
.
protected static final byte BATCH_WRITE_OP
write
.
protected static final byte BATCH_TAKE_OP
take
.
private static final Logger logger
Constructor Detail |
---|
protected LogFile(File baseDir, String baseFile)
protected LogFile(String basePath) throws IOException
basePath
has a directory component, it is used as
the base directory. Otherwise the base directory is
"."
. If basePath
names a directory,
the base name will be ""
. Otherwise the file
component is used as the base, with a "." added at the end if it
is not already present.
IOException
Method Detail |
---|
int existingLogs(Collection files)
void destroy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |