Class QueryLoggerComposite<T>
java.lang.Object
org.refcodes.logger.QueryLoggerComposite<T>
- Type Parameters:
T- The type of theRecordinstances managed by theLogger.
- All Implemented Interfaces:
Flushable,org.refcodes.component.Closable,org.refcodes.component.ComponentComposite,org.refcodes.component.Decomposable,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.Resumable,org.refcodes.component.Startable,org.refcodes.component.Stoppable,LogDecorator,Logger<T>,QueryLogger<T>,org.refcodes.mixin.Disposable,org.refcodes.mixin.Resetable
public class QueryLoggerComposite<T>
extends Object
implements org.refcodes.component.ComponentComposite
The
QueryLoggerComposite is a ready to use implementation of a
composite QueryLogger extending the
AbstractQueryLoggerComposite.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.component.Closable
org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>Nested classes/interfaces inherited from interface org.refcodes.component.ComponentComposite
org.refcodes.component.ComponentComposite.ExtendedComponentComposite<CTX,CON> Nested classes/interfaces inherited from interface org.refcodes.component.Decomposable
org.refcodes.component.Decomposable.DecomposeAutomatonNested classes/interfaces inherited from interface org.refcodes.component.Destroyable
org.refcodes.component.Destroyable.DestroyAutomatonNested classes/interfaces inherited from interface org.refcodes.component.Flushable
org.refcodes.component.Flushable.FlushBuilder<B extends org.refcodes.component.Flushable.FlushBuilder<B>>Nested classes/interfaces inherited from interface org.refcodes.component.Initializable
org.refcodes.component.Initializable.InitializeAutomaton, org.refcodes.component.Initializable.InitializeBuilder<B extends org.refcodes.component.Initializable.InitializeBuilder<B>>, org.refcodes.component.Initializable.UncheckedInitializableNested classes/interfaces inherited from interface org.refcodes.component.LifecycleComponent
org.refcodes.component.LifecycleComponent.LifecycleAutomaton, org.refcodes.component.LifecycleComponent.UncheckedLifecycleComponentNested classes/interfaces inherited from interface org.refcodes.component.LinkComponent
org.refcodes.component.LinkComponent.LinkAutomaton, org.refcodes.component.LinkComponent.LinkComponentBuilder<B extends org.refcodes.component.LinkComponent.LinkComponentBuilder<B>>Nested classes/interfaces inherited from interface org.refcodes.component.Openable
org.refcodes.component.Openable.OpenAutomaton, org.refcodes.component.Openable.OpenBuilder<B extends org.refcodes.component.Openable.OpenBuilder<B>>Nested classes/interfaces inherited from interface org.refcodes.component.Pausable
org.refcodes.component.Pausable.PauseAutomaton, org.refcodes.component.Pausable.PauseBuilder<B extends org.refcodes.component.Pausable.PauseBuilder<B>>, org.refcodes.component.Pausable.UncheckedPausableNested classes/interfaces inherited from interface org.refcodes.component.Resumable
org.refcodes.component.Resumable.ResumeAutomaton, org.refcodes.component.Resumable.ResumeBuilder<B extends org.refcodes.component.Resumable.ResumeBuilder<B>>, org.refcodes.component.Resumable.UncheckedResumableNested classes/interfaces inherited from interface org.refcodes.component.Startable
org.refcodes.component.Startable.StartAutomaton, org.refcodes.component.Startable.StartBuilder<B extends org.refcodes.component.Startable.StartBuilder<B>>, org.refcodes.component.Startable.UncheckedStartableNested classes/interfaces inherited from interface org.refcodes.component.Stoppable
org.refcodes.component.Stoppable.StopAutomaton, org.refcodes.component.Stoppable.StopBuilder<B extends org.refcodes.component.Stoppable.StopBuilder<B>>, org.refcodes.component.Stoppable.UncheckedStoppable -
Constructor Summary
ConstructorsConstructorDescriptionQueryLoggerComposite(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, QueryLogger<T>... aLoggers) Similar to theQueryLoggerComposite(QueryLogger...)with the additional option of determining the execution strategy of the state change request calls for the encapsulatedQueryLoggerinstances (as ofComponentComposite).QueryLoggerComposite(QueryLogger<T>... aLoggers) Instantiates a newQueryLoggerCompositecomposed of the providedQueryLoggerinstances. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidvoiddestroy()voiddispose()org.refcodes.tabular.Records<T> findLogs()Retrieves all availableRecordinstances being logged.org.refcodes.tabular.Records<T> findLogs(int aLimit) Retrieves all availableRecordinstances being logged matching the given criteria and restrictions.org.refcodes.tabular.Records<T> findLogs(org.refcodes.criteria.Criteria aCriteria) Retrieves all availableRecordinstances being logged matching the given criteria and restrictions.org.refcodes.tabular.Records<T> findLogs(org.refcodes.criteria.Criteria aCriteria, int aLimit) Retrieves all availableRecordinstances being logged matching the given criteria and restrictions.org.refcodes.tabular.Records<T> Retrieves all availableRecordinstances 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 availableRecordinstances being logged matching the given criteria and restrictions.org.refcodes.tabular.Records<T> Retrieves all availableRecordinstances being logged matching the given criteria and restrictions.voidflush()protected Collection<QueryLogger<T>> Gets the loggers.voidvoidLogs aRecord.voidopen()voidpause()voidreset()voidresume()voidstart()voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.refcodes.component.Closable
closeIn, closeQuietly, closeUncheckedMethods inherited from interface org.refcodes.component.Flushable
flushUnchecked, isFlushableMethods inherited from interface org.refcodes.component.Initializable
initializeUncheckedMethods inherited from interface org.refcodes.logger.LogDecorator
printHead, printSeparator, printTailMethods inherited from interface org.refcodes.component.Openable
openUncheckedMethods inherited from interface org.refcodes.component.Pausable
pauseUncheckedMethods inherited from interface org.refcodes.component.Resumable
resumeUncheckedMethods inherited from interface org.refcodes.component.Startable
startUncheckedMethods inherited from interface org.refcodes.component.Stoppable
stopUnchecked
-
Constructor Details
-
QueryLoggerComposite
Instantiates a newQueryLoggerCompositecomposed of the providedQueryLoggerinstances.- Parameters:
aLoggers- theLoggerinstances populating this composite.- See Also:
-
QueryLoggerComposite
@SafeVarargs public QueryLoggerComposite(org.refcodes.controlflow.ExecutionStrategy aComponentExecutionStrategy, QueryLogger<T>... aLoggers) Similar to theQueryLoggerComposite(QueryLogger...)with the additional option of determining the execution strategy of the state change request calls for the encapsulatedQueryLoggerinstances (as ofComponentComposite).- Parameters:
aComponentExecutionStrategy- The strategy to be used when invoking a component's (encapsulatedQueryLoggerinstance's) state change request call (as ofComponentComposite).aLoggers- theQueryLoggerinstances populating this composite.
-
-
Method Details
-
initialize
public void initialize() throws org.refcodes.component.InitializeException- Specified by:
initializein interfaceorg.refcodes.component.Initializable- Throws:
org.refcodes.component.InitializeException
-
start
public void start() throws org.refcodes.component.StartException- Specified by:
startin interfaceorg.refcodes.component.Startable- Throws:
org.refcodes.component.StartException
-
pause
public void pause() throws org.refcodes.component.PauseException- Specified by:
pausein interfaceorg.refcodes.component.Pausable- Throws:
org.refcodes.component.PauseException
-
resume
public void resume() throws org.refcodes.component.ResumeException- Specified by:
resumein interfaceorg.refcodes.component.Resumable- Throws:
org.refcodes.component.ResumeException
-
stop
public void stop() throws org.refcodes.component.StopException- Specified by:
stopin interfaceorg.refcodes.component.Stoppable- Throws:
org.refcodes.component.StopException
-
decompose
public void decompose()- Specified by:
decomposein interfaceorg.refcodes.component.Decomposable
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceorg.refcodes.component.Flushable- Throws:
IOException
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.refcodes.component.Destroyable
-
reset
public void reset()- Specified by:
resetin interfaceorg.refcodes.mixin.Resetable
-
open
- Specified by:
openin interfaceorg.refcodes.component.Openable- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceorg.refcodes.component.Closable
-
dispose
public void dispose()- Specified by:
disposein interfaceorg.refcodes.mixin.Disposable
-
findLogs
Retrieves all availableRecordinstances being logged.- Specified by:
findLogsin interfaceQueryLogger<L extends QueryLogger<T>>- Returns:
- A
Recordsinstance containing all availableRecordinstances being logged.
-
findLogs
Retrieves all availableRecordinstances being logged matching the given criteria and restrictions.- Specified by:
findLogsin interfaceQueryLogger<L extends QueryLogger<T>>- Parameters:
aLimit- The maximumRecordinstances contained in the returnedRecordsinstance; there may be moreRecordinstances which are not contained in theRecordsinstance in case theRecordsinstance's size is that of the specified limit.- Returns:
- A
Recordsinstance containing all availableRecordinstances being logged matching the given criteria and restrictions.
-
findLogs
Retrieves all availableRecordinstances being logged matching the given criteria and restrictions.- Specified by:
findLogsin interfaceQueryLogger<L extends QueryLogger<T>>- Parameters:
aCriteria- TheCriteriato be applied to theRecordinstances- Returns:
- A
Recordsinstance containing all availableRecordinstances being logged matching the given criteria and restrictions.
-
findLogs
Retrieves all availableRecordinstances being logged matching the given criteria and restrictions.- Specified by:
findLogsin interfaceQueryLogger<L extends QueryLogger<T>>- Parameters:
aHeader- TheHeaderused to restrict the "columns" (key/value entries) in the retrievedRecordinstances (provided by theRecordsinstance).aLimit- The maximumRecordinstances contained in the returnedRecordsinstance; there may be moreRecordinstances which are not contained in theRecordsinstance in case theRecordsinstance's size is that of the specified limit.- Returns:
- A
Recordsinstance containing all availableRecordinstances being logged matching the given criteria and restrictions.
-
findLogs
public org.refcodes.tabular.Records<T> findLogs(org.refcodes.criteria.Criteria aCriteria, int aLimit) throws org.refcodes.criteria.BadCriteriaException Retrieves all availableRecordinstances being logged matching the given criteria and restrictions.- Specified by:
findLogsin interfaceQueryLogger<L extends QueryLogger<T>>- Parameters:
aCriteria- TheCriteriato be applied to theRecordinstancesaLimit- The maximumRecordinstances contained in the returnedRecordsinstance; there may be moreRecordinstances which are not contained in theRecordsinstance in case theRecordsinstance's size is that of the specified limit.- Returns:
- A
Recordsinstance containing all availableRecordinstances being logged matching the given criteria and restrictions. - Throws:
org.refcodes.criteria.BadCriteriaException- thrown in case of problems related to someCriteria.
-
findLogs
public org.refcodes.tabular.Records<T> findLogs(org.refcodes.criteria.Criteria aCriteria, org.refcodes.tabular.Header<T> aHeader) throws org.refcodes.criteria.BadCriteriaException Retrieves all availableRecordinstances being logged matching the given criteria and restrictions.- Specified by:
findLogsin interfaceQueryLogger<L extends QueryLogger<T>>- Parameters:
aCriteria- TheCriteriato be applied to theRecordinstancesaHeader- TheHeaderused to restrict the "columns" (key/value entries) in the retrievedRecordinstances (provided by theRecordsinstance).- Returns:
- A
Recordsinstance containing all availableRecordinstances being logged matching the given criteria and restrictions. - Throws:
org.refcodes.criteria.BadCriteriaException- thrown in case of problems related to someCriteria.
-
findLogs
public org.refcodes.tabular.Records<T> findLogs(org.refcodes.criteria.Criteria aCriteria, org.refcodes.tabular.Header<T> aHeader, int aLimit) throws org.refcodes.criteria.BadCriteriaException Retrieves all availableRecordinstances being logged matching the given criteria and restrictions.- Specified by:
findLogsin interfaceQueryLogger<L extends QueryLogger<T>>- Parameters:
aCriteria- TheCriteriato be applied to theRecordinstancesaHeader- TheHeaderused to restrict the "columns" (key/value entries) in the retrievedRecordinstances (provided by theRecordsinstance).aLimit- The maximumRecordinstances contained in the returnedRecordsinstance; there may be moreRecordinstances which are not contained in theRecordsinstance in case theRecordsinstance's size is that of the specified limit.- Returns:
- A
Recordsinstance containing all availableRecordinstances being logged matching the given criteria and restrictions. - Throws:
org.refcodes.criteria.BadCriteriaException- thrown in case of problems related to someCriteria.
-
log
Logs aRecord. The targeted data sink for theRecordinstances (where them are physically stored) depends on the implementation of theLogger. It can be a console, a file, a stream or a database. -
getLoggers
-