T
- The type of the Record
instances managed by the
Logger
.Flushable
, org.refcodes.component.Closable
, org.refcodes.component.CompositeComponent
, org.refcodes.component.Decomposeable
, org.refcodes.component.Destroyable
, org.refcodes.component.Flushable
, org.refcodes.component.Initializable
, org.refcodes.component.LifeCycleComponent
, org.refcodes.component.LinkComponent
, org.refcodes.component.Openable
, org.refcodes.component.Pausable
, org.refcodes.component.Resetable
, org.refcodes.component.Resumable
, org.refcodes.component.Startable
, org.refcodes.component.Stoppable
, Logger<T>
, QueryLogger<T>
, TrimLogger<T>
, org.refcodes.mixin.Disposable
, org.refcodes.structure.Clearable
public class CompositeTrimLoggerImpl<T> extends Object implements org.refcodes.component.CompositeComponent
CompositeTrimLoggerImpl
is a ready to use implementation of a
composite TrimLogger
extending the
AbstractCompositeTrimLogger
.AbstractCompositeTrimLogger
org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>
org.refcodes.component.CompositeComponent.ExtendedCompositeComponent<CTX extends Object,CON extends Object>
org.refcodes.component.Decomposeable.DecomposeAutomaton
org.refcodes.component.Destroyable.DestroyAutomaton
org.refcodes.mixin.Disposable.Disposedable
org.refcodes.component.Flushable.FlushBuilder<B extends org.refcodes.component.Flushable.FlushBuilder<B>>
org.refcodes.component.Initializable.InitializeAutomaton, org.refcodes.component.Initializable.InitializeBuilder<B extends org.refcodes.component.Initializable.InitializeBuilder<B>>, org.refcodes.component.Initializable.UncheckedInitializable
org.refcodes.component.LifeCycleComponent.LifeCycleAutomaton, org.refcodes.component.LifeCycleComponent.UncheckedLifeCycleComponent
org.refcodes.component.LinkComponent.LinkAutomaton, org.refcodes.component.LinkComponent.LinkComponentBuilder<B extends org.refcodes.component.LinkComponent.LinkComponentBuilder<B>>
org.refcodes.component.Openable.OpenAutomaton, org.refcodes.component.Openable.OpenBuilder<B extends org.refcodes.component.Openable.OpenBuilder<B>>
org.refcodes.component.Pausable.PauseAutomaton, org.refcodes.component.Pausable.PauseBuilder<B extends org.refcodes.component.Pausable.PauseBuilder<B>>, org.refcodes.component.Pausable.UncheckedPausable
org.refcodes.component.Resumable.ResumeAutomaton, org.refcodes.component.Resumable.ResumeBuilder<B extends org.refcodes.component.Resumable.ResumeBuilder<B>>, org.refcodes.component.Resumable.UncheckedResumable
Constructor | Description |
---|---|
CompositeTrimLoggerImpl(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy,
TrimLogger<T>... aLoggers) |
Similar to the
CompositeTrimLoggerImpl(TrimLogger...) with the
additional option of determining the execution strategy of the state
change request calls for the encapsulated TrimLogger instances
(as of CompositeComponent ). |
CompositeTrimLoggerImpl(TrimLogger<T>... aLoggers) |
Instantiates a new composite trim logger impl.
|
Modifier and Type | Method | Description |
---|---|---|
void |
clear() |
|
void |
close() |
|
void |
decompose() |
|
void |
deleteLogs(org.refcodes.criteria.Criteria aCriteria) |
Deletes logged
Record instances according to the provided
Criteria . |
void |
destroy() |
|
void |
dispose() |
|
org.refcodes.tabular.Records<T> |
findLogs() |
Retrieves all available
Record instances being logged. |
org.refcodes.tabular.Records<T> |
findLogs(int aLimit) |
Retrieves all available
Record instances being logged matching
the given criteria and restrictions. |
org.refcodes.tabular.Records<T> |
findLogs(org.refcodes.criteria.Criteria aCriteria) |
Retrieves all available
Record instances being logged matching
the given criteria and restrictions. |
org.refcodes.tabular.Records<T> |
findLogs(org.refcodes.criteria.Criteria aCriteria,
int aLimit) |
Retrieves all available
Record instances being logged matching
the given criteria and restrictions. |
org.refcodes.tabular.Records<T> |
findLogs(org.refcodes.criteria.Criteria aCriteria,
org.refcodes.tabular.Header<T> aHeader) |
Retrieves all available
Record instances being logged matching
the given criteria and restrictions. |
org.refcodes.tabular.Records<T> |
findLogs(org.refcodes.criteria.Criteria aCriteria,
org.refcodes.tabular.Header<T> aHeader,
int aLimit) |
Retrieves all available
Record instances being logged matching
the given criteria and restrictions. |
org.refcodes.tabular.Records<T> |
findLogs(org.refcodes.tabular.Header<T> aHeader,
int aLimit) |
Retrieves all available
Record instances being logged matching
the given criteria and restrictions. |
void |
flush() |
|
protected Collection<L> |
getLoggers() |
Gets the loggers.
|
void |
initialize() |
|
void |
log(org.refcodes.tabular.Record<? extends T> aRecord) |
Logs a
Record . |
void |
open() |
|
void |
pause() |
|
void |
reset() |
|
void |
resume() |
|
void |
start() |
|
void |
stop() |
closeIn, closeQuietly, closeUnchecked
log, printSeparator
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
@SafeVarargs public CompositeTrimLoggerImpl(TrimLogger<T>... aLoggers)
aLoggers
- the loggersAbstractCompositeTrimLogger(TrimLogger...)
@SafeVarargs public CompositeTrimLoggerImpl(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, TrimLogger<T>... aLoggers)
CompositeTrimLoggerImpl(TrimLogger...)
with the
additional option of determining the execution strategy of the state
change request calls for the encapsulated TrimLogger
instances
(as of CompositeComponent
).
aComponentExecutionStrategy
- The strategy to be used when invoking
a component's (encapsulated TrimLogger
instance's) state
change request call (as of CompositeComponent
).public void initialize() throws org.refcodes.component.InitializeException
initialize
in interface org.refcodes.component.Initializable
org.refcodes.component.InitializeException
public void start() throws org.refcodes.component.StartException
start
in interface org.refcodes.component.Startable
org.refcodes.component.StartException
public void pause() throws org.refcodes.component.PauseException
pause
in interface org.refcodes.component.Pausable
org.refcodes.component.PauseException
public void resume() throws org.refcodes.component.ResumeException
resume
in interface org.refcodes.component.Resumable
org.refcodes.component.ResumeException
public void stop() throws org.refcodes.component.StopException
stop
in interface org.refcodes.component.Stoppable
org.refcodes.component.StopException
public void decompose()
decompose
in interface org.refcodes.component.Decomposeable
public void flush() throws org.refcodes.component.OpenException
public void destroy()
destroy
in interface org.refcodes.component.Destroyable
public void reset()
reset
in interface org.refcodes.component.Resetable
public void open() throws org.refcodes.component.OpenException
open
in interface org.refcodes.component.Openable
org.refcodes.component.OpenException
public void close()
close
in interface org.refcodes.component.Closable
public void dispose()
dispose
in interface org.refcodes.mixin.Disposable
public void clear()
clear
in interface org.refcodes.structure.Clearable
public void deleteLogs(org.refcodes.criteria.Criteria aCriteria)
Record
instances according to the provided
Criteria
.deleteLogs
in interface TrimLogger<L extends TrimLogger<T>>
aCriteria
- The Criteria
to be applied when deleting
previously logged Record
instances.public org.refcodes.tabular.Records<T> findLogs()
Record
instances being logged.findLogs
in interface QueryLogger<L extends QueryLogger<T>>
Records
instance containing all available
Record
instances being logged.public org.refcodes.tabular.Records<T> findLogs(int aLimit)
Record
instances being logged matching
the given criteria and restrictions.findLogs
in interface QueryLogger<L extends QueryLogger<T>>
aLimit
- The maximum Record
instances contained in the
returned Records
instance; there may be more
Record
instances which are not contained in the
Records
instance in case the Records
instance's
size is that of the specified limit.Records
instance containing all available
Record
instances being logged matching the given criteria
and restrictions.public org.refcodes.tabular.Records<T> findLogs(org.refcodes.criteria.Criteria aCriteria)
Record
instances being logged matching
the given criteria and restrictions.findLogs
in interface QueryLogger<L extends QueryLogger<T>>
aCriteria
- The Criteria
to be applied to the Record
instancesRecords
instance containing all available
Record
instances being logged matching the given criteria
and restrictions.public org.refcodes.tabular.Records<T> findLogs(org.refcodes.tabular.Header<T> aHeader, int aLimit)
Record
instances being logged matching
the given criteria and restrictions.findLogs
in interface QueryLogger<L extends QueryLogger<T>>
aHeader
- The Header
used to restrict the "columns"
(key/value entries) in the retrieved Record
instances
(provided by the Records
instance).aLimit
- The maximum Record
instances contained in the
returned Records
instance; there may be more
Record
instances which are not contained in the
Records
instance in case the Records
instance's
size is that of the specified limit.Records
instance containing all available
Record
instances being logged matching the given criteria
and restrictions.public org.refcodes.tabular.Records<T> findLogs(org.refcodes.criteria.Criteria aCriteria, int aLimit)
Record
instances being logged matching
the given criteria and restrictions.findLogs
in interface QueryLogger<L extends QueryLogger<T>>
aCriteria
- The Criteria
to be applied to the Record
instancesaLimit
- The maximum Record
instances contained in the
returned Records
instance; there may be more
Record
instances which are not contained in the
Records
instance in case the Records
instance's
size is that of the specified limit.Records
instance containing all available
Record
instances being logged matching the given criteria
and restrictions.public org.refcodes.tabular.Records<T> findLogs(org.refcodes.criteria.Criteria aCriteria, org.refcodes.tabular.Header<T> aHeader)
Record
instances being logged matching
the given criteria and restrictions.findLogs
in interface QueryLogger<L extends QueryLogger<T>>
aCriteria
- The Criteria
to be applied to the Record
instancesaHeader
- The Header
used to restrict the "columns"
(key/value entries) in the retrieved Record
instances
(provided by the Records
instance).Records
instance containing all available
Record
instances being logged matching the given criteria
and restrictions.public org.refcodes.tabular.Records<T> findLogs(org.refcodes.criteria.Criteria aCriteria, org.refcodes.tabular.Header<T> aHeader, int aLimit)
Record
instances being logged matching
the given criteria and restrictions.findLogs
in interface QueryLogger<L extends QueryLogger<T>>
aCriteria
- The Criteria
to be applied to the Record
instancesaHeader
- The Header
used to restrict the "columns"
(key/value entries) in the retrieved Record
instances
(provided by the Records
instance).aLimit
- The maximum Record
instances contained in the
returned Records
instance; there may be more
Record
instances which are not contained in the
Records
instance in case the Records
instance's
size is that of the specified limit.Records
instance containing all available
Record
instances being logged matching the given criteria
and restrictions.public void log(org.refcodes.tabular.Record<? extends T> aRecord) throws IllegalRecordRuntimeException, UnexpectedLogRuntimeException
Record
. The targeted data sink for the Record
instances (where them are physically stored) depends on the
implementation of the Logger
. It can be a console, a file, a
stream or a database.log
in interface Logger<L extends Logger<T>>
aRecord
- The Record
to be logged.IllegalRecordRuntimeException
- Thrown in case the record cannot be
logged as a specific implementation might expect some dedicated
Column
instances to be contained in the provided Record.UnexpectedLogRuntimeException
- Thrown in case some other problems
regarding logging occurred, e.g. the data sink (physical system
where to log to) experiences problems.protected Collection<L> getLoggers()
Copyright © 2018. All rights reserved.