|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.develop.trace.TraceBuffer
Field Summary | |
static String[] |
acceptorNames
|
static int |
ADD
|
private int |
currentSize
The current number. |
static int |
DEBUG
|
static String |
DEFAULT_NAME
|
private TraceMessage |
end
The last message in the buffer. |
static int |
ERROR
The different trace thresholds. |
static int |
EVENT
|
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
|
private int |
maxSize
The max number of messages between start and end (inclusive). |
private Object |
myLock
|
static int |
NUM_ACCEPTORS
The number of different types of TraceMessageAcceptors. |
static int |
OVERWRITE
|
static String[] |
reasonNames
|
static long |
SMALLEST_LOG_SIZE_THRESHOLD
|
private TraceMessage |
start
The first message in the buffer. |
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) |
TraceBuffer()
|
Method Summary | |
void |
accept(TraceMessage message)
Accept a message and do whatever is appropriate to make it visible to a user, either now or later. |
(package private) void |
changeSize(String value)
|
(package private) void |
dump(String destination)
Dump the buffer to a file. |
(package private) void |
dump(TraceMessageAcceptor acceptor)
Dump the buffer to a TraceMessageAcceptor. |
(package private) TraceMessage |
getFirstMessage()
|
private TraceMessage |
recordTraceMessageXyzzY(String message,
int level)
|
void |
setupIsComplete()
After this call, the TraceMessageAcceptor must obey settings from the environment. |
private TraceMessage |
unpostedTraceMessage(String message,
int level)
Create a trace message that isn't posted to all the message acceptors. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final Object myLock
private TraceMessage start
private TraceMessage end
private int maxSize
private int currentSize
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
Constructor Detail |
TraceBuffer()
Method Detail |
public void accept(TraceMessage message)
TraceMessageAcceptor
Note that this method should be called AFTER the message passes a priority threshold check. MessageAcceptors don't know about priorities.
The TraceMessageAcceptor is allowed to unilaterally discard the message. Generally, this is done only if it was turned off by another thread.
accept
in interface TraceMessageAcceptor
void changeSize(String value)
void dump(String destination)
void dump(TraceMessageAcceptor acceptor)
TraceMessage getFirstMessage()
public void setupIsComplete()
TraceMessageAcceptor
It is an error to call this method more than once.
setupIsComplete
in interface TraceMessageAcceptor
private TraceMessage unpostedTraceMessage(String message, int level)
private TraceMessage recordTraceMessageXyzzY(String message, int level)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |