|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.develop.trace.TraceVersionNamer | +--org.erights.e.develop.trace.TraceTxtVersionNamer
This class and its subclasses know how to construct backup version Files for files that end in ".txt".
Field Summary | |
static String[] |
acceptorNames
|
static int |
ADD
|
static int |
DEBUG
|
static String |
DEFAULT_NAME
|
static int |
ERROR
The different trace thresholds. |
static int |
EVENT
|
private static int |
extlen
The length of the ".txt" extension, for convenience. |
static int |
FOR_SUBSYSTEM
|
static int |
FROM_DEFAULT
When referring to thresholds, are we talking about those from the default thresholds, or ones specific to a subsystem? XXX These could be interned strings, but interning didn't work right in 1.0.4. |
static int |
IRRELEVANT
|
static int |
LOG
This identifies the TraceMessageAcceptor used for the on-disk log. |
static String |
LOG_EXTENSION
|
static int |
MAX_THRESHOLD
|
(package private) String |
myBasename
The basename is that part of the file that precedes a sequence number. |
(package private) String |
myDir
A directory that contains the given file. |
(package private) String |
myName
The 'filename' part of the given file, sans directory. |
static int |
NUM_ACCEPTORS
The number of different types of TraceMessageAcceptors. |
static int |
OVERWRITE
|
static String[] |
reasonNames
|
static long |
SMALLEST_LOG_SIZE_THRESHOLD
|
static int |
STARTING_LOG_BACKUP_ACTION
|
static File |
STARTING_LOG_DIR
|
static long |
STARTING_LOG_SIZE_THRESHOLD
|
static String |
STARTING_LOG_TAG
|
static int |
STARTING_LOG_THRESHOLD
|
static boolean |
STARTING_LOG_WRITE
|
static int |
STARTING_TRACE_BUFFER_SIZE
|
static int |
STARTING_TRACE_THRESHOLD
|
static int |
TIMING
As a late addition, there's a "timing" boolean that can be set orthogonally from the thresholds. |
static int |
TRACE
This identifies the TraceMessageAcceptor used for the in-core trace and its associated window. |
static String |
UNLIMITED_NAME
|
static int |
USAGE
|
static int |
VERBOSE
|
static String |
version
|
static int |
WARNING
|
static int |
WORLD
|
Constructor Summary | |
(package private) |
TraceTxtVersionNamer(File aFile)
|
Method Summary | |
(package private) File |
constructVersion(int sequence)
Create a backup file name, given a sequence number. |
(package private) static TraceVersionNamer |
factory(File file)
Return a TraceTxtVersionNamer if the file ends with ".txt"; otherwise, return a TraceVersionNamer. |
(package private) String |
fetchBasename()
The basename of a backup version, including any trailing '.' separating the basename from the sequence number. |
(package private) File |
firstVersion()
The backup file with sequence number 0. |
(package private) int |
getSeq(String filename)
Return a sequence number, if the given file contains one. |
static void |
main(String[] args)
|
(package private) boolean |
mightHaveSeq(String filename)
True iff the filename is of a format that could be a backup version of the original file. |
(package private) File |
nextAvailableVersion()
Return the next file in the sequence |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final int extlen
public static final String version
public static final int LOG
public static final int TRACE
public static final int NUM_ACCEPTORS
public static final String[] acceptorNames
public static final int ERROR
public static final int WARNING
public static final int WORLD
public static final int USAGE
public static final int EVENT
public static final int DEBUG
public static final int VERBOSE
public static final int MAX_THRESHOLD
public static final int TIMING
public static final int FROM_DEFAULT
public static final int FOR_SUBSYSTEM
public static final String[] reasonNames
public static final int STARTING_TRACE_BUFFER_SIZE
public static final int STARTING_TRACE_THRESHOLD
public static final long STARTING_LOG_SIZE_THRESHOLD
public static final long SMALLEST_LOG_SIZE_THRESHOLD
public static final int STARTING_LOG_THRESHOLD
public static final boolean STARTING_LOG_WRITE
public static final int IRRELEVANT
public static final int ADD
public static final int OVERWRITE
public static final int STARTING_LOG_BACKUP_ACTION
public static final File STARTING_LOG_DIR
public static final String STARTING_LOG_TAG
public static final String LOG_EXTENSION
public static final String DEFAULT_NAME
public static final String UNLIMITED_NAME
final String myName
final String myDir
final String myBasename
Constructor Detail |
TraceTxtVersionNamer(File aFile)
Method Detail |
File constructVersion(int sequence)
TraceVersionNamer
constructVersion
in class TraceVersionNamer
String fetchBasename()
TraceVersionNamer
fetchBasename
in class TraceVersionNamer
int getSeq(String filename)
TraceVersionNamer
getSeq
in class TraceVersionNamer
boolean mightHaveSeq(String filename)
TraceVersionNamer
In a stunning display of write-once-run-everywhere, the check is case-insensitive. This obeys Windows conventions about what "same files" are, not Unix conventions.
mightHaveSeq
in class TraceVersionNamer
filename
- a filename, not including any directory part.static TraceVersionNamer factory(File file)
File firstVersion()
public static void main(String[] args)
File nextAvailableVersion()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |