public class DataRecipe extends Object
DataSource
.
It represents the contact between PVManager and the DataSource
.Constructor and Description |
---|
DataRecipe()
Creates an empty data recipe.
|
DataRecipe(ExceptionHandler exceptionHandler) |
Modifier and Type | Method and Description |
---|---|
Collection<ChannelRecipe> |
getChannelRecipes() |
Map<Collector<?>,Map<String,ValueCache>> |
getChannelsPerCollectors()
Returns all channels that need to be connected, organized by the collector
that needs them.
|
Map<String,ValueCache<Boolean>> |
getConnectionCaches() |
Collector<Boolean> |
getConnectionCollector() |
ExceptionHandler |
getExceptionHandler()
Returns the exception handler to be used for this PV.
|
DataRecipe |
includeCollector(Collector<?> collector,
Map<String,ValueCache> caches)
Creates a new recipe by adding the new collector and the new caches.
|
DataRecipe |
includeRecipe(DataRecipe dataRecipe)
Creates a new recipe by adding the given recipe to this one.
|
DataRecipe |
withExceptionHandler(ExceptionHandler handler)
Creates a new data recipe with the given handler.
|
public DataRecipe()
public DataRecipe(ExceptionHandler exceptionHandler)
public DataRecipe includeCollector(Collector<?> collector, Map<String,ValueCache> caches)
Note: this method should be only used for testing as it does not scale.
collector
- the new collectorcaches
- the caches that the collector depends onpublic DataRecipe includeRecipe(DataRecipe dataRecipe)
Note: this method should be only used for testing as it does not scale.
dataRecipe
- the recipe to includepublic Map<Collector<?>,Map<String,ValueCache>> getChannelsPerCollectors()
Every time there is a new value, the data source will need to lock the collector, put the values in the value cache relative for each channel, and notify the collector.
public ExceptionHandler getExceptionHandler()
public DataRecipe withExceptionHandler(ExceptionHandler handler)
handler
- a new exception handlerpublic Map<String,ValueCache<Boolean>> getConnectionCaches()
public Collection<ChannelRecipe> getChannelRecipes()
Copyright © 2012. All Rights Reserved.