Class StatisticsServiceRemoteImpl
java.lang.Object
org.opencastproject.serviceregistry.api.RemoteBase
org.opencastproject.statistics.remote.StatisticsServiceRemoteImpl
- All Implemented Interfaces:
StatisticsService
@Path("/statistics")
public class StatisticsServiceRemoteImpl
extends RemoteBase
implements StatisticsService
A proxy to a remote series service.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opencastproject.serviceregistry.api.RemoteBase
RemoteBase.HttpClientClosingInputStream -
Field Summary
Fields inherited from class org.opencastproject.serviceregistry.api.RemoteBase
client, elementsFromHttpResponse, remoteServiceManager, serviceTypeFields inherited from interface org.opencastproject.statistics.api.StatisticsService
JOB_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetProvider(String providerId) getProviders(ResourceType resourceType) getTimeSeriesData(StatisticsProvider provider, String resourceId, Instant from, Instant to, DataResolution resolution, ZoneId zoneId) Get time series statistics data from the given Provider.voidsetRemoteServiceManager(ServiceRegistry serviceRegistry) Sets the remote service manager.voidsetTrustedHttpClient(TrustedHttpClient trustedHttpClient) Sets the trusted http clientvoidwriteDuration(String organizationId, String measurementName, String retentionPolicy, String organizationIdResourceName, String fieldName, TimeUnit temporalResolution, Duration duration) Write a duration to a statistics data baseMethods inherited from class org.opencastproject.serviceregistry.api.RemoteBase
closeConnection, getResponse, getResponse, runRequest
-
Constructor Details
-
StatisticsServiceRemoteImpl
public StatisticsServiceRemoteImpl()
-
-
Method Details
-
getProviders
- Specified by:
getProvidersin interfaceStatisticsService- Returns:
- All active providers.
-
getProviders
- Specified by:
getProvidersin interfaceStatisticsService- Parameters:
resourceType- The resource type.- Returns:
- All active providers for the given resource type.
-
getProvider
- Specified by:
getProviderin interfaceStatisticsService- Parameters:
providerId- The provider id.- Returns:
- Optionally return the provider with the given id (if any).
-
getTimeSeriesData
public TimeSeries getTimeSeriesData(StatisticsProvider provider, String resourceId, Instant from, Instant to, DataResolution resolution, ZoneId zoneId) Description copied from interface:StatisticsServiceGet time series statistics data from the given Provider.- Specified by:
getTimeSeriesDatain interfaceStatisticsService- Parameters:
provider- The provider to retrieve statistics from.resourceId- The id to access the resource to get statistics for (e.g. episode Id, organization Id or series Id).from- The start date to calculate the statistics for.to- The end date to calculate the statistics for.resolution- The resolution to get the statistics with.zoneId- The timezone to use for date calculations.- Returns:
- The time series data.
-
writeDuration
public void writeDuration(String organizationId, String measurementName, String retentionPolicy, String organizationIdResourceName, String fieldName, TimeUnit temporalResolution, Duration duration) Description copied from interface:StatisticsServiceWrite a duration to a statistics data base- Specified by:
writeDurationin interfaceStatisticsService- Parameters:
organizationId- Organization ID of the data pointmeasurementName- Measurement name of the data pointretentionPolicy- Retention policy of the data pointorganizationIdResourceName- Resource name for the organizationfieldName- Field name to writetemporalResolution- The temporal resolution to store it induration- The actual duration to write
-
setTrustedHttpClient
Description copied from class:RemoteBaseSets the trusted http client- Overrides:
setTrustedHttpClientin classRemoteBase- Parameters:
trustedHttpClient-
-
setRemoteServiceManager
Description copied from class:RemoteBaseSets the remote service manager.- Overrides:
setRemoteServiceManagerin classRemoteBase- Parameters:
serviceRegistry-
-