Package step.plugins.licensing.log
Class StepConsumptionsFile
- java.lang.Object
-
- step.plugins.licensing.log.StepConsumptionsFile
-
- All Implemented Interfaces:
ch.exense.licensing.client.AggregatedConsumptionsBackend
,java.io.Closeable
,java.lang.AutoCloseable
public class StepConsumptionsFile extends java.lang.Object implements ch.exense.licensing.client.AggregatedConsumptionsBackend, java.io.Closeable
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
STATEFILE_NAME
-
Constructor Summary
Constructors Constructor Description StepConsumptionsFile(java.io.File file, ch.exense.licensing.model.LicensingContext context, int shutdownAllowedDays, boolean activationExpired)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConsumption(java.lang.String grantId, long consumption)
void
close()
long
getConsumption(java.lang.String grantId)
boolean
isPersistent()
-
-
-
Field Detail
-
STATEFILE_NAME
public static final java.lang.String STATEFILE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StepConsumptionsFile
public StepConsumptionsFile(java.io.File file, ch.exense.licensing.model.LicensingContext context, int shutdownAllowedDays, boolean activationExpired) throws ch.exense.licensing.client.consumption.LicensingStateException
- Throws:
ch.exense.licensing.client.consumption.LicensingStateException
-
-
Method Detail
-
getConsumption
public long getConsumption(java.lang.String grantId)
- Specified by:
getConsumption
in interfacech.exense.licensing.client.AggregatedConsumptionsBackend
-
addConsumption
public void addConsumption(java.lang.String grantId, long consumption)
- Specified by:
addConsumption
in interfacech.exense.licensing.client.AggregatedConsumptionsBackend
-
isPersistent
public boolean isPersistent()
- Specified by:
isPersistent
in interfacech.exense.licensing.client.AggregatedConsumptionsBackend
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-