Package org.apache.camel.resume
Interface Cacheable
-
public interface CacheableUsed to identify objects that can cache their resume state or data
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCacheable.FillPolicyThe cache fill policy can be used to determine how this cache should be filled with data.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanadd(OffsetKey<?> key, Offset<?> offset)Adds an offset key and value to the cacheResumeCache<?>getCache()Gets the cache in resume adapters and objects that cache their datadefault Cacheable.FillPolicygetFillPolicy()Gets the for this cache instancevoidsetCache(ResumeCache<?> cache)Sets the cache in resume adapters and objects that cache their data
-
-
-
Method Detail
-
add
boolean add(OffsetKey<?> key, Offset<?> offset)
Adds an offset key and value to the cache- Parameters:
key- the key to addoffset- the offset to add- Returns:
- true if added successfully (i.e.: the cache is not full) or false otherwise
-
setCache
void setCache(ResumeCache<?> cache)
Sets the cache in resume adapters and objects that cache their data- Parameters:
cache- A resume cache instance
-
getCache
ResumeCache<?> getCache()
Gets the cache in resume adapters and objects that cache their data- Returns:
- A resume cache instance
-
getFillPolicy
default Cacheable.FillPolicy getFillPolicy()
Gets the for this cache instance- Returns:
- the fill policy set for this instance FillPolicy.MAXIMIZING
-
-