Package de.hybris.platform.util
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 java.lang.Objectabstract class used to for the Singleton creation.
-
-
Constructor Summary
Constructors Constructor Description Creator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Tcreate()create the singleton instanceprotected voiddestroy(T singleton)cleans up the singleton instance.protected abstract java.lang.ObjectgetID()returns a unique id which is used in the internal cache map as the key for the singleton instance.protected booleanisExpired()
-
-
-
Method Detail
-
getID
protected abstract java.lang.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 java.lang.Exception
create the singleton instance- Throws:
java.lang.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 java.lang.Exception
cleans up the singleton instance. this hookin method is invoked whenever SingletonCreator.destroy() is called.- Throws:
java.lang.Exception
-
-