java.lang.Object
org.refcodes.logger.QueryLoggerFactoryComposite<T>
- Type Parameters:
T
- The type of theRecord
instances managed by theLogger
.
- All Implemented Interfaces:
org.refcodes.factory.LookupFactory<QueryLogger<T>,
,String> LoggerFactory<QueryLogger<T>>
Implementation of the
AbstractLoggerFactoryComposite
creating
composite QueryLogger
instances.-
Constructor Summary
ConstructorDescriptionQueryLoggerFactoryComposite
(LoggerFactory<QueryLogger<T>> aLoggerFactory, int aNumEndpoints) Instantiates a new composite query logger factory impl. -
Method Summary
Modifier and TypeMethodDescriptionCreates a compoundLogger
containingLogger
instances fabricated by the providedLoggerFactory
(as passed to the constructor).Creates a compoundLogger
containingLogger
instances 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 aLoggerComposite
(or its sub-classes) from the providedLogger
instances (or its sub-types).protected LoggerFactory<QueryLogger<T>>
TheLoggerFactory
which to use in order to create the encapsulatedLogger
instances contained in the compositeLogger
instances created by theLookupFactory.create(String)
orLookupFactory.create(String, Map)
methods.protected int
-
Constructor Details
-
QueryLoggerFactoryComposite
Instantiates a new composite query logger factory impl.- Parameters:
aLoggerFactory
- theLoggerFactory
populating this composite.aNumEndpoints
- the num endpoints
-
-
Method Details
-
createCompositeLogger
To be implemented by sub-classes, this method creates aLoggerComposite
(or its sub-classes) from the providedLogger
instances (or its sub-types). -
create
Creates a compoundLogger
containingLogger
instances fabricated by the providedLoggerFactory
(as passed to the constructor). The provided schema body is used when creating theLogger
instances with thisLoggerFactory
. When creating thoseLogger
instances 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:
create
in interfaceorg.refcodes.factory.LookupFactory<L extends Logger<?>,
String> - Parameters:
aSchemaBody
- The 'schema'# to be used by theLogger
instances 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 actualLogger
implementation returned by theLoggerFactory
(as passed to the constructor).- Returns:
- The composite
Logger
instance as fabricated by thisAbstractLoggerFactoryComposite
.
-
create
Creates a compoundLogger
containingLogger
instances fabricated by the providedLoggerFactory
(as passed to the constructor). The provided schema body is used when creating theLogger
instances with thisLoggerFactory
. When creating thoseLogger
instances 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:
create
in interfaceorg.refcodes.factory.LookupFactory<L extends Logger<?>,
String> - Parameters:
aSchemaBody
- The 'schema'# to be used by theLogger
instances 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 actualLogger
implementation returned by theLoggerFactory
(as passed to the constructor).aProperties
- Properties which may be used to pass additional configuration settings to theLoggerFactory
(as passed to the constructor) when creating the encapsulatedLogger
instances.- Returns:
- The composite
Logger
instance as fabricated by thisAbstractLoggerFactoryComposite
.
-
getNumEndpoints
protected int getNumEndpoints() -
getLoggerFactory
TheLoggerFactory
which to use in order to create the encapsulatedLogger
instances contained in the compositeLogger
instances created by theLookupFactory.create(String)
orLookupFactory.create(String, Map)
methods.- Returns:
- The
LoggerFactory
to be used by theAbstractLoggerFactoryComposite
when creating the encapsulatedLogger
instances to be contained in the compositeLogger
instances..
-