Package net.solarnetwork.node.service
Interface DatumService
- All Known Implementing Classes:
DefaultDatumService
public interface DatumService
API for a service that supports node-wide datum information.
- Since:
- 1.89
- Version:
- 1.1
- Author:
- matt
-
Method Summary
Modifier and TypeMethodDescriptionnet.solarnetwork.domain.datum.DatumMetadataOperationsdatumMetadata(String sourceId) Get the metadata for a given datum stream.Collection<net.solarnetwork.domain.datum.DatumMetadataOperations>datumMetadata(Set<String> sourceIdFilter) Get the metadata for a set of datum streams matching a filter.<T extends NodeDatum>
TGet the latest available datum of a given type, optionally filtered by source IDs.<T extends NodeDatum>
Collection<T>Get the latest available datum of a given type, optionally filtered by source IDs.<T extends NodeDatum>
TGet an offset from the latest available datum of a given type, optionally filtered by source IDs.<T extends NodeDatum>
TGet a datum offset from a given timestamp.<T extends NodeDatum>
Collection<T>Get an offset from the latest available datum of a given type, optionally filtered by source IDs.<T extends NodeDatum>
Collection<T>Get datum offset from a given timestamp, optionally filtered by source IDs.
-
Method Details
-
latest
Get the latest available datum of a given type, optionally filtered by source IDs.This is equivalent to calling
offset(sourceIdFilter, 0, type).- Type Parameters:
T- the type of datum to get- Parameters:
sourceIdFilter- an optional set of Ant-style source ID patterns to filter bytype- the type of datum- Returns:
- the matching datum, never null
- See Also:
-
latest
Get the latest available datum of a given type, optionally filtered by source IDs.This is equivalent to calling
offset(sourceIdFilter, 0, type).- Type Parameters:
T- the type of datum to get- Parameters:
sourceId- the source ID to findtype- the type of datum- Returns:
- the matching datum, never null
- Since:
- 1.1
- See Also:
-
offset
Get an offset from the latest available datum of a given type, optionally filtered by source IDs.- Type Parameters:
T- the type of datum to get- Parameters:
sourceIdFilter- an optional set of Ant-style source ID patterns to filter by; use null or an empty set to return all available sourcesoffset- the offset from the latest, 0 being the latest and 1 the next later, and so ontype- the type of datum- Returns:
- the matching datum, never null
- Since:
- 1.1
-
offset
Get an offset from the latest available datum of a given type, optionally filtered by source IDs.- Type Parameters:
T- the type of datum to get- Parameters:
sourceId- the source ID to findoffset- the offset from the latest, 0 being the latest and 1 the next later, and so ontype- the type of datum- Returns:
- the matching datum, never null
- Since:
- 1.1
-
offset
<T extends NodeDatum> Collection<T> offset(Set<String> sourceIdFilter, Instant timestamp, int offset, Class<T> type) Get datum offset from a given timestamp, optionally filtered by source IDs.- Type Parameters:
T- the type of datum to get- Parameters:
sourceIdFilter- an optional set of Ant-style source ID patterns to filter by; use null or an empty set to return all available sourcestimestamp- the timestamp to referenceoffset- the offset fromtimestamp, 0 being the latest and 1 the next later, and so ontype- the type of datum- Returns:
- the matching datum, never null
- Since:
- 1.1
-
offset
Get a datum offset from a given timestamp.- Type Parameters:
T- the type of datum to get- Parameters:
sourceId- the source ID of the datum to findtimestamp- the timestamp to referenceoffset- the offset fromtimestamp, 0 being the latest and 1 the next later, and so ontype- the type of datum- Returns:
- the datum, or null if no such datum is available
-
datumMetadata
Get the metadata for a given datum stream.- Parameters:
sourceId- the source ID of the datum metadata to get- Returns:
- the metadata, or null if no such metadata is available
- Since:
- 1.1
-
datumMetadata
Collection<net.solarnetwork.domain.datum.DatumMetadataOperations> datumMetadata(Set<String> sourceIdFilter) Get the metadata for a set of datum streams matching a filter.- Parameters:
sourceIdFilter- an optional set of Ant-style source ID patterns to filter by; use null or an empty set to return all available sources- Returns:
- the matching metadata, never null
- Since:
- 1.1
-