org.epics.pvmanager
Class DataRecipe

java.lang.Object
  extended by org.epics.pvmanager.DataRecipe

public class DataRecipe
extends java.lang.Object

Represents all the information necessary to connect to a DataSource. It represents the contact between PVManager and the DataSource.

Author:
carcassi

Constructor Summary
DataRecipe()
          Creates an empty data recipe.
 
Method Summary
 java.util.Map<Collector,java.util.Map<java.lang.String,ValueCache>> getChannelsPerCollectors()
          Returns all channels that need to be connected, organized by the collector that needs them.
 ExceptionHandler getExceptionHandler()
          Returns the exception handler to be used for this PV.
 DataRecipe includeCollector(Collector collector, java.util.Map<java.lang.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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataRecipe

public DataRecipe()
Creates an empty data recipe.

Method Detail

includeCollector

public DataRecipe includeCollector(Collector collector,
                                   java.util.Map<java.lang.String,ValueCache> caches)
Creates a new recipe by adding the new collector and the new caches.

Note: this method should be only used for testing as it does not scale.

Parameters:
collector - the new collector
caches - the caches that the collector depends on
Returns:
the new recipe

includeRecipe

public DataRecipe includeRecipe(DataRecipe dataRecipe)
Creates a new recipe by adding the given recipe to this one.

Note: this method should be only used for testing as it does not scale.

Parameters:
dataRecipe - the recipe to include
Returns:
the new recipe

getChannelsPerCollectors

public java.util.Map<Collector,java.util.Map<java.lang.String,ValueCache>> getChannelsPerCollectors()
Returns all channels that need to be connected, organized by the collector that needs them.

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.

Returns:
a map with all the channels organized by collector.

getExceptionHandler

public ExceptionHandler getExceptionHandler()
Returns the exception handler to be used for this PV.

Returns:
the exception handler

withExceptionHandler

public DataRecipe withExceptionHandler(ExceptionHandler handler)


Copyright © 2010. All Rights Reserved.