Class EdgeCache

java.lang.Object
io.openems.backend.common.edgewebsocket.EdgeCache

public class EdgeCache extends Object
  • Constructor Details

    • EdgeCache

      public EdgeCache()
  • Method Details

    • getChannelValue

      public final com.google.gson.JsonElement getChannelValue(String address)
      Gets the channel value from cache.
      Parameters:
      address - the Channel-Address of the channel
      Returns:
      the value; JsonNull if it is not in cache
    • getChannelValues

      public final EdgeCache.Pair<Map<String,com.google.gson.JsonElement>,Set<String>> getChannelValues(Set<String> addresses)
      Gets the channel values from cache.
      Parameters:
      addresses - the Channel-Addresses of the channels
      Returns:
      a) Map of Channel-Address to values (JsonNull if not in cache); b) Set of Channel-Addresses that are only available as aggregated data
    • updateCurrentData

      public void updateCurrentData(TimestampedDataNotification notification)
      Updates the Cache.
      Parameters:
      notification - the incoming data
    • updateAggregatedData

      public void updateAggregatedData(AggregatedDataNotification notification)
      Updates the aggregated data cache.
      Parameters:
      notification - the incoming data