org.epics.pvmanager
Class WriteCache<T>

java.lang.Object
  extended by org.epics.pvmanager.WriteFunction<T>
      extended by org.epics.pvmanager.WriteCache<T>
Type Parameters:
T - the payload type to be held in the cache

public class WriteCache<T>
extends WriteFunction<T>

Represent part of the write buffer that holds the value for one pv.

Author:
carcassi

Constructor Summary
WriteCache()
          Creates a new cache.
WriteCache(java.lang.String channelName)
          Creates a new cache for the given channel name.
 
Method Summary
 java.lang.String getChannelName()
          The channel associated to this cache
 java.util.Collection<java.lang.String> getPrecedingChannels()
          Returns all the channels in the same buffer that should be written before writing the channel for this cache.
 T getValue()
          Returns the value in the cache.
 void setPrecedingChannels(java.util.List<java.lang.String> precedingChannels)
          Changes which channels need to be written before the channel for this cache can be written.
 void setValue(T newValue)
          Changes the value in the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriteCache

public WriteCache()
Creates a new cache.


WriteCache

public WriteCache(java.lang.String channelName)
Creates a new cache for the given channel name.

Parameters:
channelName - the channel name
Method Detail

getValue

public T getValue()
Returns the value in the cache.

Returns:
value in the cache

setValue

public void setValue(T newValue)
Changes the value in the cache.

Specified by:
setValue in class WriteFunction<T>
Parameters:
newValue - the new value

setPrecedingChannels

public void setPrecedingChannels(java.util.List<java.lang.String> precedingChannels)
Changes which channels need to be written before the channel for this cache can be written.

Parameters:
precedingChannels - a list of channel names

getPrecedingChannels

public java.util.Collection<java.lang.String> getPrecedingChannels()
Returns all the channels in the same buffer that should be written before writing the channel for this cache.

Returns:
a list of channel names

getChannelName

public java.lang.String getChannelName()
The channel associated to this cache

Returns:
the channel name