Class LastSample
java.lang.Object
org.epics.archiverappliance.retrieval.postprocessors.LastSample
- All Implemented Interfaces:
PostProcessor,PostProcessorWithConsolidatedEventStream
public class LastSample
extends Object
implements PostProcessor, PostProcessorWithConsolidatedEventStream
Similar to the firstSample operator with the exception that we use the last sample in the bin.\
- Author:
- mshankar
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongestimateMemoryConsumption(String pvName, PVTypeInfo typeInfo, Instant start, Instant end, jakarta.servlet.http.HttpServletRequest req) Estimate the amount of memory required for the data generated by the post processors.longThis is the full form of the identity for the post processor and includes any parameters for the post processor.The string used by clients to identify this post processor when making retrieval requests.longvoidinitialize(String userarg, String pvName) Initialize this post processor for the given PV and request parameters.wrap(Callable<EventStream> callable) Primary data generation method.
-
Constructor Details
-
LastSample
public LastSample()
-
-
Method Details
-
initialize
Description copied from interface:PostProcessorInitialize this post processor for the given PV and request parameters.- Specified by:
initializein interfacePostProcessor- Parameters:
userarg- This is the full form (extension) of the identity for the post processor.pvName- The name of PV- Throws:
IOException-
-
estimateMemoryConsumption
public long estimateMemoryConsumption(String pvName, PVTypeInfo typeInfo, Instant start, Instant end, jakarta.servlet.http.HttpServletRequest req) Description copied from interface:PostProcessorEstimate the amount of memory required for the data generated by the post processors.- Specified by:
estimateMemoryConsumptionin interfacePostProcessor- Parameters:
pvName- The name of PVtypeInfo- PVTypeInfostart- Instantend- Instantreq- HttpServletRequest- Returns:
- Estimated Memory comsumption
-
wrap
Description copied from interface:PostProcessorPrimary data generation method. Using the event stream provided, do your magic and generate processed data- Specified by:
wrapin interfacePostProcessor- Parameters:
callable-- Returns:
- EventStream
-
getIdentity
Description copied from interface:PostProcessorThe string used by clients to identify this post processor when making retrieval requests. For example to identify the FirstSamplePP postprocessor, users would add a pp=firstSample to the request for data. The situation is a little more complex; if a post processor has parameters then it needs to combine these into a string and offer that as an extension. The identity is just the starting part of this.- For example, pp=firstSample_600 asks the server to sparsify with an interval of 600 seconds.
- identity is firstSample.
- extension is firstSample_600.
- User specifies firstSample_600.
- ETL caches the data as firstSample_600 if asked to.
- Specified by:
getIdentityin interfacePostProcessor- Returns:
- identify
-
getExtension
Description copied from interface:PostProcessorThis is the full form of the identity for the post processor and includes any parameters for the post processor. The exact format and interpretation of this is left to the post processor; however the convention is to use underscores to separate the params and have them in a specific order.- Specified by:
getExtensionin interfacePostProcessor- Returns:
- extension
- See Also:
-
getConsolidatedEventStream
- Specified by:
getConsolidatedEventStreamin interfacePostProcessorWithConsolidatedEventStream
-
getStartBinEpochSeconds
public long getStartBinEpochSeconds()- Specified by:
getStartBinEpochSecondsin interfacePostProcessorWithConsolidatedEventStream
-
getEndBinEpochSeconds
public long getEndBinEpochSeconds()- Specified by:
getEndBinEpochSecondsin interfacePostProcessorWithConsolidatedEventStream
-
getBinTimestamps
- Specified by:
getBinTimestampsin interfacePostProcessorWithConsolidatedEventStream
-