Class SingletonDoubleCheckedCreator<T>

java.lang.Object
org.jasig.portlet.newsreader.spring.DoubleCheckedCreator<T>
org.jasig.portlet.newsreader.spring.SingletonDoubleCheckedCreator<T>

public abstract class SingletonDoubleCheckedCreator<T> extends DoubleCheckedCreator<T>
Provides a DoubleCheckedCreator impl that tracks the singleton instance internally
Since:
5.1.1
Version:
$Revision$
Author:
Eric Dalquist
  • Constructor Details

    • SingletonDoubleCheckedCreator

      public SingletonDoubleCheckedCreator()
  • Method Details

    • createSingleton

      protected abstract T createSingleton(Object... args)
      Called only once as long as it returns successfully
      Parameters:
      args - a Object object
      Returns:
      a T object
      See Also:
    • create

      protected final T create(Object... args)

      create.

      Specified by:
      create in class DoubleCheckedCreator<T>
      Parameters:
      args - Arguments to use when creating the object
      Returns:
      A newly created object
    • retrieve

      protected final T retrieve(Object... args)

      retrieve.

      Specified by:
      retrieve in class DoubleCheckedCreator<T>
      Parameters:
      args - Arguments to use when retrieving the object
      Returns:
      An existing object if available
    • isCreated

      public final boolean isCreated()

      isCreated.

      Returns:
      true if the singleton has been created as of this call
    • toString

      public String toString()
      Overrides:
      toString in class Object