public class NoCache extends java.lang.Object implements ProcessedItemCache
ProcessedItemCache
implementation that doesn't cache.In the adapter configuration file this class is aliased as fs-no-processed-item-cache which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
NoCache() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the cache.
|
void |
close()
Closes the component.
|
boolean |
contains(java.lang.String key)
Query the cache for this key.
|
void |
evict()
evict any items in the cache that require it..
|
ProcessedItem |
get(java.lang.String key)
Get the TrackedItem associated with the key.
|
void |
init()
Initialises the component.
|
void |
save()
Explicitly save the state of the cache.
|
int |
size()
Return the number of items in the cache.
|
void |
start()
Starts the component.
|
void |
stop()
Stop the component
|
void |
update(ProcessedItem i)
Update the cache with the tracked item.
|
void |
update(ProcessedItemList list)
Update the cache with the associated list of entries.
|
public boolean contains(java.lang.String key)
ProcessedItemCache
contains
in interface ProcessedItemCache
key
- the keypublic ProcessedItem get(java.lang.String key)
ProcessedItemCache
get
in interface ProcessedItemCache
key
- the keypublic void update(ProcessedItem i)
ProcessedItemCache
update
in interface ProcessedItemCache
i
- the tracked item.public void clear()
ProcessedItemCache
clear
in interface ProcessedItemCache
public int size()
ProcessedItemCache
size
in interface ProcessedItemCache
public void close()
ComponentLifecycle
A closed component should release any connections it uses, etc. and clean up completely.
Throwing a RuntimeException
may cause unintended consequences
close
in interface ComponentLifecycle
ComponentLifecycle.close()
public void init() throws CoreException
ComponentLifecycle
Component initialisation includes config verification, creation of connections etc.
init
in interface ComponentLifecycle
CoreException
- wrapping any underlying Exception
sComponentLifecycle.init()
public void start() throws CoreException
ComponentLifecycle
Once a component is started it should be ready to process messages. In the case of
AdaptrisMessageConsumer
, calling start will begin message delivery.
start
in interface ComponentLifecycle
CoreException
- wrapping any underlying Exception
sComponentLifecycle.start()
public void stop()
ComponentLifecycle
A stopped component is not expected to be ready to process messages. In the case of
AdaptrisMessageConsumer
, calling stop will pause message delivery. Throwing a
RuntimeException
may cause unintended consequences
stop
in interface ComponentLifecycle
ComponentLifecycle.stop()
public void save()
ProcessedItemCache
save
in interface ProcessedItemCache
public void update(ProcessedItemList list)
ProcessedItemCache
update
in interface ProcessedItemCache
list
- a list of tracked itemspublic void evict()
ProcessedItemCache
evict
in interface ProcessedItemCache