Class AggregatedServiceUsageRecord
java.lang.Object
org.gcube.documentstore.records.implementation.AbstractRecord
org.gcube.accounting.datamodel.BasicUsageRecord
org.gcube.accounting.datamodel.basetypes.AbstractServiceUsageRecord
org.gcube.accounting.datamodel.aggregation.AggregatedServiceUsageRecord
- 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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gcube.accounting.datamodel.UsageRecord
UsageRecord.OperationResult -
Field Summary
FieldsFields inherited from class org.gcube.accounting.datamodel.basetypes.AbstractServiceUsageRecord
CALLED_METHOD, CALLER_HOST, CALLER_QUALIFIER, HOST, SERVICE_CLASS, SERVICE_NAME, UNKNOWNFields inherited from class org.gcube.accounting.datamodel.BasicUsageRecord
CONSUMER_ID, OPERATION_RESULT, SCOPEFields inherited from class org.gcube.documentstore.records.implementation.AbstractRecord
aggregatedFields, computation, computedFields, CREATION_TIME, ID, requiredFields, resourceProperties, validationFields inherited from interface org.gcube.accounting.datamodel.AggregatedUsageRecord
AGGREGATED, END_TIME, OPERATION_COUNT, START_TIMEFields inherited from interface org.gcube.documentstore.records.Record
CREATION_TIME, ID, RECORD_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaggregate(ServiceUsageRecord record) protected longlonglongintbooleanbooleanisAggregable(ServiceUsageRecord record) voidsetAggregated(Boolean aggregate) voidsetEndTime(Calendar endTime) voidsetMaxInvocationTime(long maxInvocationTime) voidsetMinInvocationTime(long minInvocationTime) voidsetOperationCount(int operationCount) voidsetStartTime(Calendar startTime) Methods inherited from class org.gcube.accounting.datamodel.basetypes.AbstractServiceUsageRecord
getCalledMethod, getCallerHost, getCallerQualifier, getDuration, getHost, getRecordType, getServiceClass, getServiceName, setCalledMethod, setCallerHost, setCallerQualifier, setDuration, setHost, setServiceClass, setServiceNameMethods inherited from class org.gcube.accounting.datamodel.BasicUsageRecord
getConsumerId, getOperationResult, getQuerableKeys, getScope, init, setConsumerId, setOperationResult, setScopeMethods inherited from class org.gcube.documentstore.records.implementation.AbstractRecord
cleanExtraFields, compareTo, computeField, getAggregatedFields, getAllFields, getComputedFields, getCreationTime, getEndTimeAsCalendar, getEndTimeInMillis, getId, getRequiredFields, getResourceProperties, getResourceProperty, getStartTimeAsCalendar, getStartTimeInMillis, initializeValidation, removeResourceProperty, setCreationTime, setId, setResourceProperties, setResourceProperty, timestampToCalendar, toString, validate, validateField, validatePropertiesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.gcube.documentstore.records.AggregatedRecord
getAggregatedFieldsMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.gcube.documentstore.records.Record
getComputedFields, getCreationTime, getId, getQuerableKeys, getRecordType, getRequiredFields, getResourceProperties, getResourceProperty, removeResourceProperty, setCreationTime, setId, setResourceProperties, setResourceProperty, validate
-
Field Details
-
DURATION
- See Also:
-
MAX_INVOCATION_TIME
- See Also:
-
MIN_INVOCATION_TIME
- See Also:
-
-
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:
getOperationCountin interfaceorg.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord> - Overrides:
getOperationCountin classorg.gcube.documentstore.records.implementation.AbstractRecord
-
setOperationCount
public void setOperationCount(int operationCount) throws org.gcube.documentstore.exception.InvalidValueException - Specified by:
setOperationCountin interfaceorg.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord> - Overrides:
setOperationCountin classorg.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
- Specified by:
getStartTimein interfaceorg.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>
-
setStartTime
public void setStartTime(Calendar startTime) throws org.gcube.documentstore.exception.InvalidValueException - Specified by:
setStartTimein interfaceorg.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord> - Overrides:
setStartTimein classorg.gcube.documentstore.records.implementation.AbstractRecord- Throws:
org.gcube.documentstore.exception.InvalidValueException
-
getEndTime
- Specified by:
getEndTimein interfaceorg.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>
-
setEndTime
public void setEndTime(Calendar endTime) throws org.gcube.documentstore.exception.InvalidValueException - Specified by:
setEndTimein interfaceorg.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord> - Overrides:
setEndTimein classorg.gcube.documentstore.records.implementation.AbstractRecord- Throws:
org.gcube.documentstore.exception.InvalidValueException
-
setAggregated
public void setAggregated(Boolean aggregate) throws org.gcube.documentstore.exception.InvalidValueException - Overrides:
setAggregatedin classorg.gcube.documentstore.records.implementation.AbstractRecord- Throws:
org.gcube.documentstore.exception.InvalidValueException
-
isAggregated
- Overrides:
isAggregatedin classorg.gcube.documentstore.records.implementation.AbstractRecord
-
durationWeightedAverage
-
aggregate
public AggregatedServiceUsageRecord aggregate(AggregatedServiceUsageRecord record) throws org.gcube.documentstore.exception.NotAggregatableRecordsExceptions - Specified by:
aggregatein interfaceorg.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:
aggregatein interfaceorg.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:
isAggregablein interfaceorg.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:
isAggregablein interfaceorg.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord> - Throws:
org.gcube.documentstore.exception.NotAggregatableRecordsExceptions
-
getAggregable
- Specified by:
getAggregablein interfaceorg.gcube.documentstore.records.AggregatedRecord<AggregatedServiceUsageRecord,ServiceUsageRecord>
-