Class ObjectPool<T>

  • Type Parameters:
    T -
    All Implemented Interfaces:
    Serializable, org.bedework.util.logging.Logged

    public class ObjectPool<T>
    extends Object
    implements Serializable, org.bedework.util.logging.Logged
    Implement a pool of objects whose values appear frequently enough that pooling will result in a substantial reduction in space and or cpu.

    Objects pooled must be either immutable or sharable because they will be shared.

    Author:
    Mike Douglass
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ObjectPool()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T get​(T val)  
      org.bedework.util.logging.BwLogger getLogger()  
      • Methods inherited from interface org.bedework.util.logging.Logged

        audit, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, warn
    • Constructor Detail

      • ObjectPool

        public ObjectPool()
    • Method Detail

      • get

        public T get​(T val)
        Parameters:
        val - key
        Returns:
        value in pool
      • getLogger

        public org.bedework.util.logging.BwLogger getLogger()
        Specified by:
        getLogger in interface org.bedework.util.logging.Logged