Interface ResourceClaim
- All Superinterfaces:
Comparable<ResourceClaim>
Represents a resource that can be provided by a ContentRepository
MUST BE THREAD-SAFE!
-
Method Summary
Modifier and TypeMethodDescriptiondefault intcompareTo(ResourceClaim other) Provides the natural ordering for ResourceClaim objects.getId()booleanisInUse()Indicates whether or not the Resource Claim is in use.booleanboolean
-
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:
trueif the Resource Claim may still be written to,falseif 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:
trueif the Resource Claim is in use,falseotherwise
-
compareTo
Provides the natural ordering for ResourceClaim objects. By default they are sorted by their id, then container, then section- Specified by:
compareToin interfaceComparable<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
-