Class CompositeTrimLoggerFactoryImpl<T>

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

    public class CompositeTrimLoggerFactoryImpl<T>
    extends java.lang.Object
    Specialization and instantiateable (non abstract) implementation of the AbstractCompositeLoggerFactory creating composite TrimLogger instances.
    • Constructor Detail

      • CompositeTrimLoggerFactoryImpl

        public CompositeTrimLoggerFactoryImpl​(LoggerFactory<TrimLogger<T>> aLoggerFactory,
                                              int aNumEndpoints)
        Instantiates a new composite trim logger factory impl.
        Parameters:
        aLoggerFactory - the logger factory
        aNumEndpoints - the num endpoints
    • Method Detail

      • createCompositeLogger

        protected TrimLogger<T> createCompositeLogger​(TrimLogger<T>[] aLoggers)
        To be implemented by sub-classes, this method creates a CompositeLoggerImpl (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.
      • createInstance

        public L createInstance​(java.lang.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:
        createInstance in interface org.refcodes.factory.LookupFactory<L extends Logger<?>,java.lang.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 AbstractCompositeLoggerFactory.
      • createInstance

        public L createInstance​(java.lang.String aSchemaBody,
                                java.util.Map<java.lang.String,java.lang.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:
        createInstance in interface org.refcodes.factory.LookupFactory<L extends Logger<?>,java.lang.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 AbstractCompositeLoggerFactory.
      • 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.