Class QueryLoggerFactoryComposite<T>

java.lang.Object
org.refcodes.logger.QueryLoggerFactoryComposite<T>
Type Parameters:
T - The type of the Record instances managed by the Logger.
All Implemented Interfaces:
org.refcodes.factory.LookupFactory<QueryLogger<T>,String>, LoggerFactory<QueryLogger<T>>

public class QueryLoggerFactoryComposite<T> extends Object
Implementation of the AbstractLoggerFactoryComposite creating composite QueryLogger instances.
  • Constructor Details

    • QueryLoggerFactoryComposite

      public QueryLoggerFactoryComposite(LoggerFactory<QueryLogger<T>> aLoggerFactory, int aNumEndpoints)
      Instantiates a new composite query logger factory impl.
      Parameters:
      aLoggerFactory - the LoggerFactory populating this composite.
      aNumEndpoints - the num endpoints
  • Method Details

    • createCompositeLogger

      protected QueryLogger<T> createCompositeLogger(QueryLogger<T>[] aLoggers)
      To be implemented by sub-classes, this method creates a LoggerComposite (or its sub-classes) from the provided Logger instances (or its sub-types).
      Parameters:
      aLoggers - The Logger instances (or its sub-types) to be contained in the composite.
      Returns:
      The composite containing the given Logger instances.
    • create

      public QueryLogger<T> create(String aSchemaBody)
      Creates a compound Logger containing Logger instances fabricated by the provided LoggerFactory (as passed to the constructor). The provided schema body is used when creating the Logger instances with this LoggerFactory. When creating those Logger instances by the provided LoggerFactory (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 interface org.refcodes.factory.LookupFactory<L extends Logger<?>,String>
      Parameters:
      aSchemaBody - The 'schema'# to be used by the Logger instances created by the provided LoggerFactory (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 actual Logger implementation returned by the LoggerFactory (as passed to the constructor).
      Returns:
      The composite Logger instance as fabricated by this AbstractLoggerFactoryComposite.
    • create

      public QueryLogger<T> create(String aSchemaBody, Map<String,String> aProperties)
      Creates a compound Logger containing Logger instances fabricated by the provided LoggerFactory (as passed to the constructor). The provided schema body is used when creating the Logger instances with this LoggerFactory. When creating those Logger instances by the provided LoggerFactory (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 interface org.refcodes.factory.LookupFactory<L extends Logger<?>,String>
      Parameters:
      aSchemaBody - The 'schema'# to be used by the Logger instances created by the provided LoggerFactory (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 actual Logger implementation returned by the LoggerFactory (as passed to the constructor).
      aProperties - Properties which may be used to pass additional configuration settings to the LoggerFactory (as passed to the constructor) when creating the encapsulated Logger instances.
      Returns:
      The composite Logger instance as fabricated by this AbstractLoggerFactoryComposite.
    • getNumEndpoints

      protected int getNumEndpoints()
      Retrieves the number if Logger instances to be created when creating a composite Logger.
      Returns:
      The number of Logger instances to be contained in the composite Logger.
    • getLoggerFactory

      protected LoggerFactory<QueryLogger<T>> getLoggerFactory()
      The LoggerFactory which to use in order to create the encapsulated Logger instances contained in the composite Logger instances created by the LookupFactory.create(String) or LookupFactory.create(String, Map) methods.
      Returns:
      The LoggerFactory to be used by the AbstractLoggerFactoryComposite when creating the encapsulated Logger instances to be contained in the composite Logger instances..