Modifier and Type | Class and Description |
---|---|
class |
BoundedMeter
A BoundedMeter enforces an upper bound, provides an approver callback for
changes and allocates from an optional parent.
|
class |
NotifyingMeter
A NotifyingMeter provides an approver callback for changes and
allocates from an optional parent.
|
class |
SimpleMeter
A SimpleMeter counts resource requests and releases
and allocates from an optional parent.
|
class |
ThrottledMeter
A ThrottledMeter with bandwidth limit, an approver callback for requests and
allocates from an optional parent.
|
Modifier and Type | Method and Description |
---|---|
ResourceRequest |
SimpleMeter.getParent()
Returns the parent ResourceRequest.
|
ResourceRequest |
ResourceContextFactory.getResourceRequest(ResourceType type)
Returns the ResourceRequest for the current ResourceContext and ResourceType.
|
ResourceRequest |
ResourceContext.getResourceRequest(ResourceType type)
Returns the ResourceRequest in the ResourceContext that handles
requests to allocate or release for the ResourceType.
|
Modifier and Type | Method and Description |
---|---|
static BoundedMeter |
BoundedMeter.create(ResourceType type,
long bound,
ResourceRequest parent)
Returns a new BoundedMeter with the type, upper bound, and parent.
|
static BoundedMeter |
BoundedMeter.create(ResourceType type,
long bound,
ResourceRequest parent,
ResourceApprover approver)
Returns a new BoundedMeter with the type, upper bound, parent, and
approver.
|
static ThrottledMeter |
ThrottledMeter.create(ResourceType type,
long ratePerSec,
ResourceRequest parent,
ResourceApprover approver)
Create a new meter with a throttle rate, parent and approver.
|
static SimpleMeter |
SimpleMeter.create(ResourceType type,
ResourceRequest parent)
Returns a new SimpleMeter with the ResourceType and allocating from a parent.
|
static NotifyingMeter |
NotifyingMeter.create(ResourceType type,
ResourceRequest parent,
ResourceApprover approver)
Returns a new NotifyingMeter with the type, approver and parent approver.
|
static ThrottledMeter |
ThrottledMeter.create(ResourceType type,
ResourceRequest parent,
ResourceApprover approver)
Create a new meter with unlimited rate, parent and approver.
|
Constructor and Description |
---|
BoundedMeter(ResourceType type,
long bound,
ResourceRequest parent,
ResourceApprover approver)
Constructor of a BoundedMeter.
|
NotifyingMeter(ResourceType type,
ResourceRequest parent,
ResourceApprover approver)
Constructor for subclasses.
|
SimpleMeter(ResourceType type,
ResourceRequest parent)
Constructor for subclasses.
|
Copyright © 2014, 2016, Oracle and/or its affiliates. All rights reserved.