@Beta public class ResourceAllocation extends Object
Constructor and Description |
---|
ResourceAllocation(Resource resource,
ResourceConsumer consumer)
Creates an instance with the specified subject, resource and consumer.
|
ResourceAllocation(Resource resource,
ResourceConsumerId consumerId)
Creates an instance with the specified subject, resource and consumerId.
|
Modifier and Type | Method and Description |
---|---|
ResourceConsumerId |
consumerId()
Returns ID of the consumer of this resource.
|
boolean |
equals(Object obj) |
int |
hashCode() |
Resource |
resource()
Returns the specifier of the resource this allocation uses.
|
String |
toString() |
public ResourceAllocation(Resource resource, ResourceConsumerId consumerId)
resource
- resource of the subjectconsumerId
- consumer ID of this resourcepublic ResourceAllocation(Resource resource, ResourceConsumer consumer)
resource
- resource of the subjectconsumer
- consumer of this resourcepublic Resource resource()
public ResourceConsumerId consumerId()