Package org.eclipse.hono.util
Class LimitedResource
- java.lang.Object
-
- org.eclipse.hono.util.LimitedResource
-
- Direct Known Subclasses:
ConnectionDuration
,DataVolume
public abstract class LimitedResource extends Object
Common parameters for defining limits on the usage of a resource.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
LimitedResource(Instant effectiveSince, ResourceLimitsPeriod period)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instant
getEffectiveSince()
Gets the point in time at which the limit became or will become effective.ResourceLimitsPeriod
getPeriod()
Gets the definition of the accounting periods used for this specification.
-
-
-
Constructor Detail
-
LimitedResource
protected LimitedResource(Instant effectiveSince, ResourceLimitsPeriod period)
Creates an instance.- Parameters:
effectiveSince
- The point in time at which the limit became or will become effective.period
- The definition of the accounting periods to be used for this specification ornull
to use the default period definition with mode "monthly".- Throws:
NullPointerException
- if effective since isnull
.
-
-
Method Detail
-
getEffectiveSince
@HonoTimestamp public final Instant getEffectiveSince()
Gets the point in time at which the limit became or will become effective.- Returns:
- The point in time.
-
getPeriod
public final ResourceLimitsPeriod getPeriod()
Gets the definition of the accounting periods used for this specification.The default value of this property is a period definition with mode "monthly".
- Returns:
- The period definition.
-
-