T
- the payload type to be held in the cachepublic class WriteCache<T> extends Object implements WriteFunction<T>
Constructor and Description |
---|
WriteCache()
Creates a new cache.
|
WriteCache(String channelName)
Creates a new cache for the given channel name.
|
Modifier and Type | Method and Description |
---|---|
String |
getChannelName()
The channel associated to this cache
|
Collection<String> |
getPrecedingChannels()
Returns all the channels in the same recipe that should be written
before writing the channel for this cache.
|
T |
getValue()
Returns the value in the cache.
|
void |
setPrecedingChannels(List<String> precedingChannels)
Changes which channels need to be written before the channel
for this cache can be written.
|
void |
writeValue(T newValue)
Changes the value in the cache.
|
public WriteCache()
public WriteCache(String channelName)
channelName
- the channel namepublic T getValue()
public void writeValue(T newValue)
writeValue
in interface WriteFunction<T>
newValue
- the new valuepublic void setPrecedingChannels(List<String> precedingChannels)
precedingChannels
- a list of channel namespublic Collection<String> getPrecedingChannels()
public String getChannelName()
Copyright © 2010–2015. All rights reserved.