Class ConstantCacheManagedObjectSource<K,​V>

  • All Implemented Interfaces:
    net.officefloor.frame.api.managedobject.ManagedObject, net.officefloor.frame.api.managedobject.source.ManagedObjectSource<net.officefloor.frame.api.build.None,​ConstantCacheManagedObjectSource.Flows>

    public class ConstantCacheManagedObjectSource<K,​V>
    extends net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource<net.officefloor.frame.api.build.None,​ConstantCacheManagedObjectSource.Flows>
    implements net.officefloor.frame.api.managedobject.ManagedObject
    Cache ManagedObjectSource that loads a constant data set.
    Author:
    Daniel Sagenschneider
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ConstantCacheManagedObjectSource.Flows
      Flow keys.
      • Nested classes/interfaces inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource

        net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource.DependencyLabeller<K extends java.lang.Enum<K>>, net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource.ExecutionLabeller, net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource.Labeller<K extends java.lang.Enum<K>>, net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource.MetaDataContext<O extends java.lang.Enum<O>,​F extends java.lang.Enum<F>>, net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource.SpecificationContext
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      net.officefloor.cache.Cache<K,​V> getCache()
      Obtains the Cache.
      protected net.officefloor.frame.api.managedobject.ManagedObject getManagedObject()  
      java.lang.Object getObject()  
      protected void loadMetaData​(net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource.MetaDataContext<net.officefloor.frame.api.build.None,​ConstantCacheManagedObjectSource.Flows> context)  
      protected void loadSpecification​(net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource.SpecificationContext context)
      ====================== ManagedObjectSource ==========================
      void start​(net.officefloor.frame.api.managedobject.source.ManagedObjectExecuteContext<ConstantCacheManagedObjectSource.Flows> context)  
      • Methods inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource

        sourceManagedObject
      • Methods inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource

        getSpecification, init, stop
      • Methods inherited from class java.lang.Object

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

      • ConstantCacheManagedObjectSource

        public ConstantCacheManagedObjectSource()
    • Method Detail

      • getCache

        public net.officefloor.cache.Cache<K,​V> getCache()
        Obtains the Cache.
        Returns:
        Cache.
      • loadSpecification

        protected void loadSpecification​(net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource.SpecificationContext context)
        ====================== ManagedObjectSource ==========================
        Specified by:
        loadSpecification in class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource<net.officefloor.frame.api.build.None,​ConstantCacheManagedObjectSource.Flows>
      • loadMetaData

        protected void loadMetaData​(net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource.MetaDataContext<net.officefloor.frame.api.build.None,​ConstantCacheManagedObjectSource.Flows> context)
                             throws java.lang.Exception
        Specified by:
        loadMetaData in class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource<net.officefloor.frame.api.build.None,​ConstantCacheManagedObjectSource.Flows>
        Throws:
        java.lang.Exception
      • start

        public void start​(net.officefloor.frame.api.managedobject.source.ManagedObjectExecuteContext<ConstantCacheManagedObjectSource.Flows> context)
                   throws java.lang.Exception
        Specified by:
        start in interface net.officefloor.frame.api.managedobject.source.ManagedObjectSource<K,​V>
        Overrides:
        start in class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource<net.officefloor.frame.api.build.None,​ConstantCacheManagedObjectSource.Flows>
        Throws:
        java.lang.Exception
      • getManagedObject

        protected net.officefloor.frame.api.managedobject.ManagedObject getManagedObject()
                                                                                  throws java.lang.Throwable
        Specified by:
        getManagedObject in class net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource<net.officefloor.frame.api.build.None,​ConstantCacheManagedObjectSource.Flows>
        Throws:
        java.lang.Throwable
      • getObject

        public java.lang.Object getObject()
                                   throws java.lang.Throwable
        Specified by:
        getObject in interface net.officefloor.frame.api.managedobject.ManagedObject
        Throws:
        java.lang.Throwable