Class SingletonCreator.Creator<T>

java.lang.Object
de.hybris.platform.util.SingletonCreator.Creator<T>
Direct Known Subclasses:
Manager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreator
Enclosing class:
SingletonCreator

public abstract static class SingletonCreator.Creator<T> extends Object
abstract class used to for the Singleton creation.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract T
    create the singleton instance
    protected void
    destroy(T singleton)
    cleans up the singleton instance.
    protected abstract Object
    returns a unique id which is used in the internal cache map as the key for the singleton instance.
    protected boolean
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Creator

      public Creator()
  • Method Details

    • getID

      protected abstract Object getID()
      returns a unique id which is used in the internal cache map as the key for the singleton instance.
      Returns:
      the unique ID
    • create

      protected abstract T create() throws Exception
      create the singleton instance
      Throws:
      Exception
    • isExpired

      protected boolean isExpired()
      Returns:
      true if this creator is expired which means a new instance will be created (via create()) instead of returning an already created instance
    • destroy

      protected void destroy(T singleton) throws Exception
      cleans up the singleton instance. this hookin method is invoked whenever SingletonCreator.destroy() is called.
      Throws:
      Exception