|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.epics.pvmanager.DataSource
org.epics.pvmanager.CompositeDataSource
public class CompositeDataSource
A data source that can dispatch a request to multiple different data sources.
| Constructor Summary | |
|---|---|
CompositeDataSource()
Creates a new CompositeDataSource. |
|
| Method Summary | |
|---|---|
void |
close()
Closes all DataSources that are registered in the composite. |
void |
concludeWrite(WriteBuffer writeBuffer,
ExceptionHandler exceptionHandler)
Releases the resources associated with the given write buffer. |
void |
connect(DataRecipe recipe)
Connects to a set of channels based on the given recipe. |
protected ChannelHandler |
createChannel(java.lang.String channelName)
Creates a channel handler for the given name. |
void |
disconnect(DataRecipe recipe)
Disconnects the set of channels given by the recipe. |
java.util.Map<java.lang.String,ChannelHandler> |
getChannels()
Returns the channel handlers for this data source. |
java.util.Map<java.lang.String,DataSource> |
getDataSources()
Returns the data sources registered to this composite data source. |
java.lang.String |
getDefaultDataSource()
Returns which data source is used if no data source is specified in the channel name. |
java.lang.String |
getDelimiter()
Returns the delimeter that divides the data source name from the channel name. |
void |
prepareWrite(WriteBuffer writeBuffer,
ExceptionHandler exceptionHandler)
Prepares the channels defined in the write buffer for writes. |
void |
putDataSource(java.lang.String name,
DataSource dataSource)
Adds/replaces the data source corresponding to the given name. |
void |
setDefaultDataSource(java.lang.String defaultDataSource)
Sets the data source to be used if the channel does not specify one explicitely. |
void |
setDelimiter(java.lang.String delimiter)
Changes the data source delimiter. |
| Methods inherited from class org.epics.pvmanager.DataSource |
|---|
isWriteable, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompositeDataSource()
| Method Detail |
|---|
public java.lang.String getDelimiter()
public void setDelimiter(java.lang.String delimiter)
delimiter - new data source delimiter; can't be null
public void putDataSource(java.lang.String name,
DataSource dataSource)
name - the name of the data sourcedataSource - the data source to add/replacepublic java.lang.String getDefaultDataSource()
public java.util.Map<java.lang.String,DataSource> getDataSources()
public void setDefaultDataSource(java.lang.String defaultDataSource)
defaultDataSource - the default data sourcepublic void connect(DataRecipe recipe)
DataSourceThe data source must update the value caches relative to each channel. Before updating any cache, it must lock the collector relative to that cache and after any update it must notify the collector.
connect in class DataSourcerecipe - the instructions for the data connectionpublic void disconnect(DataRecipe recipe)
DataSourceThe disconnect call is guaranteed to be given the same object, so that the recipe itself can be used as a key in a map to retrieve the list of resources needed to be closed.
disconnect in class DataSourcerecipe - the instructions for the data connection
public void prepareWrite(WriteBuffer writeBuffer,
ExceptionHandler exceptionHandler)
DataSourceIf these are channels over the network, it will create the network connections with the underlying libraries.
prepareWrite in class DataSourcewriteBuffer - the buffer that will contain the write dataexceptionHandler - where to report the exceptions
public void concludeWrite(WriteBuffer writeBuffer,
ExceptionHandler exceptionHandler)
DataSourceWill close network channels and deallocate memory needed.
concludeWrite in class DataSourcewriteBuffer - the buffer that will no longer be usedexceptionHandler - where to report the exceptionsprotected ChannelHandler createChannel(java.lang.String channelName)
DataSource
createChannel in class DataSourcechannelName - the name for a new channel
public void close()
close in class DataSourcepublic java.util.Map<java.lang.String,ChannelHandler> getChannels()
DataSource
getChannels in class DataSource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||