Class ResourceAllocation


  • @Beta
    public class ResourceAllocation
    extends Object
    Represents allocation of resource which is identified by the specifier.
    • Constructor Detail

      • ResourceAllocation

        public ResourceAllocation​(Resource resource,
                                  ResourceConsumerId consumerId)
        Creates an instance with the specified subject, resource and consumerId.
        Parameters:
        resource - resource of the subject
        consumerId - consumer ID of this resource
      • ResourceAllocation

        public ResourceAllocation​(Resource resource,
                                  ResourceConsumer consumer)
        Creates an instance with the specified subject, resource and consumer.
        Parameters:
        resource - resource of the subject
        consumer - consumer of this resource
    • Method Detail

      • resource

        public Resource resource()
        Returns the specifier of the resource this allocation uses.
        Returns:
        the specifier of the resource this allocation uses
      • consumerId

        public ResourceConsumerId consumerId()
        Returns ID of the consumer of this resource.
        Returns:
        ID of the consumer of this resource
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object