Package org.forgerock.am.cts.api
Class ETag
- java.lang.Object
-
- org.forgerock.am.cts.api.ETag
-
public class ETag extends Object
Describes an ETag for a givenToken
.ETag instances are used to perform coarse grained optimistic concurrency checks when making changes to tokens stored in the CTS backing implementation.
The ETag is generated based on the contents of the entire token and can be used to assert that no part of the token has been changed between requests.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ETag
assertEtag(String token)
Create an ETag that asserts the given value.static ETag
emptyAssertion()
An ETag which does not contain an assertion.boolean
equals(Object o)
String
getValue()
int
hashCode()
String
toString()
-
-
-
Method Detail
-
emptyAssertion
public static ETag emptyAssertion()
An ETag which does not contain an assertion.Use this when you are requesting the ETag value be read by the backing implementation.
- Returns:
- Non null ETag.
-
assertEtag
public static ETag assertEtag(String token)
Create an ETag that asserts the given value.- Parameters:
token
- Non null string representation of the ETag- Returns:
- Non null ETag which asserts this value
-
getValue
public String getValue()
- Returns:
- Non null string representation of this ETag.
-
-