@Beta
public class ResourceAllocation
extends java.lang.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(java.lang.Object obj) |
int |
hashCode() |
Resource |
resource()
Returns the specifier of the resource this allocation uses.
|
java.lang.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()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object