Class TimescaledbWriteHandler
java.lang.Object
io.openems.backend.timedata.timescaledb.internal.write.TimescaledbWriteHandler
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Constructor Summary
ConstructorDescriptionTimescaledbWriteHandler
(Config config, Consumer<Schema> onInitializedSchema) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Called by TimescaledbImpl deactivate().debugLog()
Returns a DebugLog String.Returns a DebugMetrics map.void
write
(String edgeId, com.google.common.collect.TreeBasedTable<Long, String, com.google.gson.JsonElement> data) Seeinvalid reference
Timedata#write(String, TreeBasedTable)
-
Field Details
-
POINTS_QUEUE_SIZE
public static final int POINTS_QUEUE_SIZE- See Also:
-
MAX_POINTS_PER_WRITE
public static final int MAX_POINTS_PER_WRITE- See Also:
-
MAX_AGGREGATE_WAIT
public static final int MAX_AGGREGATE_WAIT- See Also:
-
-
Constructor Details
-
TimescaledbWriteHandler
public TimescaledbWriteHandler(Config config, Consumer<Schema> onInitializedSchema) throws SQLException - Throws:
SQLException
-
-
Method Details
-
deactivate
public void deactivate()Called by TimescaledbImpl deactivate(). -
write
public void write(String edgeId, com.google.common.collect.TreeBasedTable<Long, String, com.google.gson.JsonElement> data) Seeinvalid reference
Timedata#write(String, TreeBasedTable)
- Parameters:
edgeId
- The unique Edge-IDdata
- Table of timestamp (epoch in milliseconds), Channel-Address and the Channel value as JsonElement. Sorted by timestamp.- Throws:
OpenemsException
- on error
-
debugLog
Returns a DebugLog String.- Returns:
- debug log
-
debugMetrics
Returns a DebugMetrics map.- Returns:
- metrics
-