Package alluxio.recorder
Class Recorder
- java.lang.Object
-
- alluxio.recorder.Recorder
-
- Direct Known Subclasses:
NoopRecorder
@NotThreadSafe public class Recorder extends java.lang.Object
A tool for recording information, which can be used to record the process of execution.
-
-
Constructor Summary
Constructors Constructor Description Recorder()
Constructs a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Recorder
noopRecorder()
Gets aNoopRecorder
that does not actually record anything.void
record(java.lang.String message)
Records a message.void
record(java.lang.String format, java.lang.Object... arguments)
Records a message with a format template and arguments.java.util.List<java.lang.String>
takeRecords()
Gets and clears the records recorded so far.
-
-
-
Method Detail
-
record
public void record(java.lang.String message)
Records a message.- Parameters:
message
- message
-
record
public void record(java.lang.String format, java.lang.Object... arguments)
Records a message with a format template and arguments.- Parameters:
format
- the message format stringarguments
- the message string to be recorded
-
takeRecords
public java.util.List<java.lang.String> takeRecords()
Gets and clears the records recorded so far. After this, the recorder is empty.- Returns:
- the records
-
noopRecorder
public static Recorder noopRecorder()
Gets aNoopRecorder
that does not actually record anything.- Returns:
- a NoopRecorder instance
-
-