Class QueryLoggerFactoryComposite<T>
java.lang.Object
org.refcodes.logger.QueryLoggerFactoryComposite<T>
- All Implemented Interfaces:
LookupFactory<QueryLogger<T>, String>, LoggerFactory<QueryLogger<T>>
Implementation of the
AbstractLoggerFactoryComposite creating
composite QueryLogger instances.-
Nested Class Summary
Nested classes/interfaces inherited from interface LookupFactory
LookupFactory.ConfigurableLookupFactory<T,TID, OPTS> -
Constructor Summary
ConstructorsConstructorDescriptionQueryLoggerFactoryComposite(LoggerFactory<QueryLogger<T>> aLoggerFactory, int aNumEndpoints) Instantiates a new composite query logger factory impl. -
Method Summary
Modifier and TypeMethodDescriptionCreates a compoundLoggercontainingLoggerinstances fabricated by the providedLoggerFactory(as passed to the constructor).protected QueryLogger<T> createCompositeLogger(QueryLogger<T>[] aLoggers) To be implemented by sub-classes, this method creates aLoggerDispatcher(or its sub-classes) from the providedLoggerinstances (or its sub-types).protected LoggerFactory<QueryLogger<T>> TheLoggerFactorywhich to use in order to create the encapsulatedLoggerinstances contained in the compositeLoggerinstances created by theLookupFactory.create(String)method.protected int
-
Constructor Details
-
QueryLoggerFactoryComposite
Instantiates a new composite query logger factory impl.- Parameters:
aLoggerFactory- theLoggerFactorypopulating this composite.aNumEndpoints- the num endpoints
-
-
Method Details
-
createCompositeLogger
To be implemented by sub-classes, this method creates aLoggerDispatcher(or its sub-classes) from the providedLoggerinstances (or its sub-types). -
create
Creates a compoundLoggercontainingLoggerinstances fabricated by the providedLoggerFactory(as passed to the constructor). The provided schema body is used when creating theLoggerinstances with thisLoggerFactory. When creating thoseLoggerinstances by the providedLoggerFactory(as passed to the constructor), the schema body is suffixed by a '.###' for each instance where "###" represents the actual number of an individual instance. Numbers reach from '000' to the actual number of endpoints provided to the constructor.- Specified by:
createin interfaceLookupFactory<L extends Logger<?>, String>- Parameters:
aSchemaBody- The 'schema'# to be used by theLoggerinstances created by the providedLoggerFactory(as passed to the constructor). The schema body may be part of a DB schema name or a SimpleDB domain name, this depends on the actualLoggerimplementation returned by theLoggerFactory(as passed to the constructor).- Returns:
- The composite
Loggerinstance as fabricated by thisAbstractLoggerFactoryComposite.
-
getNumEndpoints
-
getLoggerFactory
TheLoggerFactorywhich to use in order to create the encapsulatedLoggerinstances contained in the compositeLoggerinstances created by theLookupFactory.create(String)method.- Returns:
- The
LoggerFactoryto be used by theAbstractLoggerFactoryCompositewhen creating the encapsulatedLoggerinstances to be contained in the compositeLoggerinstances..
-