Class AggregatedServiceUsageRecord

java.lang.Object
org.gcube.documentstore.records.implementation.AbstractRecord
All Implemented Interfaces:
Serializable, Comparable<org.gcube.documentstore.records.Record>, AggregatedUsageRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>, UsageRecord, org.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>, org.gcube.documentstore.records.Record

public class AggregatedServiceUsageRecord extends AbstractServiceUsageRecord implements AggregatedUsageRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>
This Class is for library internal use only
Author:
Luca Frosini (ISTI - CNR)
See Also:
  • Field Details

  • Constructor Details

    • AggregatedServiceUsageRecord

      public AggregatedServiceUsageRecord()
    • AggregatedServiceUsageRecord

      public AggregatedServiceUsageRecord(Map<String,? extends Serializable> properties) throws org.gcube.documentstore.exception.InvalidValueException
      Throws:
      org.gcube.documentstore.exception.InvalidValueException
    • AggregatedServiceUsageRecord

      public AggregatedServiceUsageRecord(ServiceUsageRecord record) throws org.gcube.documentstore.exception.InvalidValueException
      Throws:
      org.gcube.documentstore.exception.InvalidValueException
  • Method Details

    • getOperationCount

      public int getOperationCount()
      Specified by:
      getOperationCount in interface org.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>
      Overrides:
      getOperationCount in class org.gcube.documentstore.records.implementation.AbstractRecord
    • setOperationCount

      public void setOperationCount(int operationCount) throws org.gcube.documentstore.exception.InvalidValueException
      Specified by:
      setOperationCount in interface org.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>
      Overrides:
      setOperationCount in class org.gcube.documentstore.records.implementation.AbstractRecord
      Throws:
      org.gcube.documentstore.exception.InvalidValueException
    • getMaxInvocationTime

      public long getMaxInvocationTime()
    • setMaxInvocationTime

      public void setMaxInvocationTime(long maxInvocationTime) throws org.gcube.documentstore.exception.InvalidValueException
      Throws:
      org.gcube.documentstore.exception.InvalidValueException
    • getMinInvocationTime

      public long getMinInvocationTime()
    • setMinInvocationTime

      public void setMinInvocationTime(long minInvocationTime) throws org.gcube.documentstore.exception.InvalidValueException
      Throws:
      org.gcube.documentstore.exception.InvalidValueException
    • getStartTime

      public Calendar getStartTime()
      Specified by:
      getStartTime in interface org.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>
    • setStartTime

      public void setStartTime(Calendar startTime) throws org.gcube.documentstore.exception.InvalidValueException
      Specified by:
      setStartTime in interface org.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>
      Overrides:
      setStartTime in class org.gcube.documentstore.records.implementation.AbstractRecord
      Throws:
      org.gcube.documentstore.exception.InvalidValueException
    • getEndTime

      public Calendar getEndTime()
      Specified by:
      getEndTime in interface org.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>
    • setEndTime

      public void setEndTime(Calendar endTime) throws org.gcube.documentstore.exception.InvalidValueException
      Specified by:
      setEndTime in interface org.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>
      Overrides:
      setEndTime in class org.gcube.documentstore.records.implementation.AbstractRecord
      Throws:
      org.gcube.documentstore.exception.InvalidValueException
    • setAggregated

      public void setAggregated(Boolean aggregate) throws org.gcube.documentstore.exception.InvalidValueException
      Overrides:
      setAggregated in class org.gcube.documentstore.records.implementation.AbstractRecord
      Throws:
      org.gcube.documentstore.exception.InvalidValueException
    • isAggregated

      public Boolean isAggregated()
      Overrides:
      isAggregated in class org.gcube.documentstore.records.implementation.AbstractRecord
    • durationWeightedAverage

      protected long durationWeightedAverage(AggregatedServiceUsageRecord record)
    • aggregate

      public AggregatedServiceUsageRecord aggregate(AggregatedServiceUsageRecord record) throws org.gcube.documentstore.exception.NotAggregatableRecordsExceptions
      Specified by:
      aggregate in interface org.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>
      Throws:
      org.gcube.documentstore.exception.NotAggregatableRecordsExceptions
    • aggregate

      public AggregatedServiceUsageRecord aggregate(ServiceUsageRecord record) throws org.gcube.documentstore.exception.NotAggregatableRecordsExceptions
      Specified by:
      aggregate in interface org.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>
      Throws:
      org.gcube.documentstore.exception.NotAggregatableRecordsExceptions
    • isAggregable

      public boolean isAggregable(AggregatedServiceUsageRecord record) throws org.gcube.documentstore.exception.NotAggregatableRecordsExceptions
      Specified by:
      isAggregable in interface org.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>
      Throws:
      org.gcube.documentstore.exception.NotAggregatableRecordsExceptions
    • isAggregable

      public boolean isAggregable(ServiceUsageRecord record) throws org.gcube.documentstore.exception.NotAggregatableRecordsExceptions
      Specified by:
      isAggregable in interface org.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>
      Throws:
      org.gcube.documentstore.exception.NotAggregatableRecordsExceptions
    • getAggregable

      public Class<ServiceUsageRecord> getAggregable()
      Specified by:
      getAggregable in interface org.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>