Interface ResourceClaim

All Superinterfaces:
Comparable<ResourceClaim>

public interface ResourceClaim extends Comparable<ResourceClaim>

Represents a resource that can be provided by a ContentRepository

MUST BE THREAD-SAFE!

  • Method Details

    • getId

      String getId()
      Returns:
      the unique identifier for this claim
    • getContainer

      String getContainer()
      Returns:
      the container identifier in which this claim is held
    • getSection

      String getSection()
      Returns:
      the section within a given container the claim is held
    • isLossTolerant

      boolean isLossTolerant()
      Returns:
      Indicates whether or not the Claim is loss-tolerant. If so, we will attempt to keep the content but will not sacrifice a great deal of performance to do so
    • isWritable

      boolean isWritable()
      Returns:
      true if the Resource Claim may still be written to, false if the Resource Claim will no longer be written to
    • isInUse

      boolean isInUse()
      Indicates whether or not the Resource Claim is in use. A Resource Claim is said to be in use if either it is writable or at least one Content Claim still refers to the it
      Returns:
      true if the Resource Claim is in use, false otherwise
    • compareTo

      default int compareTo(ResourceClaim other)
      Provides the natural ordering for ResourceClaim objects. By default they are sorted by their id, then container, then section
      Specified by:
      compareTo in interface Comparable<ResourceClaim>
      Parameters:
      other - other claim
      Returns:
      x such that x invalid input: '<'= -1 if this is less than other; x=0 if this.equals(other); x >= 1 if this is greater than other