Class PerspectiveProjectCacheImpl
java.lang.Object
com.inductiveautomation.perspective.gateway.cache.PerspectiveProjectCacheImpl
- All Implemented Interfaces:
- PerspectiveProjectCache
- 
Constructor SummaryConstructorsConstructorDescriptionPerspectiveProjectCacheImpl(GatewayContext gatewayContext, ComponentRegistry componentRegistry) 
- 
Method SummaryModifier and TypeMethodDescriptionFetch thePerspectiveProjectwith the given name from the cache.getAll()Fetches allPerspectiveProjecton the gateway and returns them as a list ofPerspectiveProjectDisplayDatagetDiff(String projectName, RuntimeProject.EffectiveProjectSnapshot snapshot) Fetches all Runnable and displayablePerspectiveProjectson the gateway and returns them as a list ofPerspectiveProjectDisplayDatacom.google.common.eventbus.EventBusFetch theEventBusfor thisPerspectiveProjectCache.voidshutdown()voidstartup()
- 
Constructor Details- 
PerspectiveProjectCacheImplpublic PerspectiveProjectCacheImpl(GatewayContext gatewayContext, ComponentRegistry componentRegistry) 
 
- 
- 
Method Details- 
startuppublic void startup()
- 
shutdownpublic void shutdown()
- 
getEventBus@Nonnull public com.google.common.eventbus.EventBus getEventBus()Description copied from interface:PerspectiveProjectCacheFetch theEventBusfor thisPerspectiveProjectCache. Interested parties maySubscribeto receiveProjectUpdatedEventswhen projects are updated, andProjectDeletedEventswhen projects are deleted.- Specified by:
- getEventBusin interface- PerspectiveProjectCache
- Returns:
- The event bus
 
- 
getDescription copied from interface:PerspectiveProjectCacheFetch thePerspectiveProjectwith the given name from the cache. If the cache does not have the entry, it will attempt to load from theProjectManageror another source of record. If the ProjectManager does not have the entry, Optional.empty is returned since this means the project does not exist.- Specified by:
- getin interface- PerspectiveProjectCache
- Returns:
- An Optionalcontaining the PerspectiveProject with the given name or an empty Optional if it does not exist or a problem occurred fetching it
 
- 
getAllDescription copied from interface:PerspectiveProjectCacheFetches allPerspectiveProjecton the gateway and returns them as a list ofPerspectiveProjectDisplayData- Specified by:
- getAllin interface- PerspectiveProjectCache
 
- 
getDisplayableDescription copied from interface:PerspectiveProjectCacheFetches all Runnable and displayablePerspectiveProjectson the gateway and returns them as a list ofPerspectiveProjectDisplayData- Specified by:
- getDisplayablein interface- PerspectiveProjectCache
 
- 
getDiffpublic Optional<ProjectUpdateResponse> getDiff(String projectName, RuntimeProject.EffectiveProjectSnapshot snapshot) - Specified by:
- getDiffin interface- PerspectiveProjectCache
- Parameters:
- projectName- Name of the (leaf) project to diff.
- snapshot- The effective snapshot of the copy of the project that you already have.
- Returns:
- A perspective project diff containing the things that have changed since the given snapshot was generated. Empty optional if the project doesn't exist.
 
 
-