Package org.infinispan.rest.operations
Class CacheOperationsHelper
- java.lang.Object
-
- org.infinispan.rest.operations.CacheOperationsHelper
-
public class CacheOperationsHelper extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CacheControlcalcCacheControl(Date expires)static intcalcFreshness(Date expires)static MetadatacreateMetadata(Configuration cfg, Optional<Long> ttl, Optional<Long> idleTime)static booleanentryFreshEnough(Date entryExpires, OptionalInt minFresh)static booleanifMatchDoesntMatchEtag(Optional<String> etagIfMatch, String etag)static booleanifModifiedIsAfterEntryModificationDate(Optional<String> etagIfModifiedSince, Date lastMod)static booleanifNoneMatchMathesEtag(Optional<String> etagIfNoneMatch, String etag)static booleanifUnmodifiedIsBeforeEntryModificationDate(Optional<String> ifUnmodifiedSince, Date lastMod)static <K,V>
DatelastModified(InternalCacheEntry<K,V> ice)static OptionalIntminFresh(String cacheControl)static booleansupportsExtendedHeaders(RestServerConfiguration restServerConfiguration, String extended)
-
-
-
Method Detail
-
createMetadata
public static Metadata createMetadata(Configuration cfg, Optional<Long> ttl, Optional<Long> idleTime)
-
supportsExtendedHeaders
public static boolean supportsExtendedHeaders(RestServerConfiguration restServerConfiguration, String extended)
-
calcCacheControl
public static CacheControl calcCacheControl(Date expires)
-
entryFreshEnough
public static boolean entryFreshEnough(Date entryExpires, OptionalInt minFresh)
-
calcFreshness
public static int calcFreshness(Date expires)
-
minFresh
public static OptionalInt minFresh(String cacheControl)
-
lastModified
public static <K,V> Date lastModified(InternalCacheEntry<K,V> ice)
-
ifUnmodifiedIsBeforeEntryModificationDate
public static boolean ifUnmodifiedIsBeforeEntryModificationDate(Optional<String> ifUnmodifiedSince, Date lastMod) throws WrongDateFormatException
- Throws:
WrongDateFormatException
-
ifMatchDoesntMatchEtag
public static boolean ifMatchDoesntMatchEtag(Optional<String> etagIfMatch, String etag)
-
ifNoneMatchMathesEtag
public static boolean ifNoneMatchMathesEtag(Optional<String> etagIfNoneMatch, String etag)
-
ifModifiedIsAfterEntryModificationDate
public static boolean ifModifiedIsAfterEntryModificationDate(Optional<String> etagIfModifiedSince, Date lastMod) throws WrongDateFormatException
- Throws:
WrongDateFormatException
-
-