@Deprecated public abstract class BroadcasterCacheBase extends java.lang.Object implements BroadcasterCache
BroadcasterCache which is used to implement headers or query parameters or
session based caching.
NOTE: This cache is deprecated, use AbstractBroadcasterCache instead.| Modifier and Type | Class and Description |
|---|---|
protected static class |
BroadcasterCacheBase.CachedMessage
Deprecated.
|
BroadcasterCache.STRATEGY| Modifier and Type | Field and Description |
|---|---|
protected int |
maxCachedinMs
Deprecated.
|
protected java.util.List<BroadcasterCacheBase.CachedMessage> |
queue
Deprecated.
|
protected java.util.concurrent.ScheduledExecutorService |
reaper
Deprecated.
|
BROADCASTER_CACHE_TRACKER| Constructor and Description |
|---|
BroadcasterCacheBase()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToCache(java.lang.String id,
AtmosphereResource resource,
java.lang.Object object)
Deprecated.
Start tracking messages associated with
AtmosphereResource from the cache |
abstract void |
cache(AtmosphereResource r,
BroadcasterCacheBase.CachedMessage cm)
Deprecated.
Cache the last message broadcasted.
|
int |
getMaxCachedinMs()
Deprecated.
Get the maximum time a broadcasted message can stay cached.
|
java.util.List<java.lang.Object> |
retrieveFromCache(java.lang.String id,
AtmosphereResource r)
Deprecated.
Retrieve messages associated with
AtmosphereResource |
abstract BroadcasterCacheBase.CachedMessage |
retrieveLastMessage(AtmosphereResource r)
Deprecated.
Return the last message broadcasted to the
AtmosphereResource. |
void |
setExecutorService(java.util.concurrent.ScheduledExecutorService reaper)
Deprecated.
|
void |
setMaxCachedinMs(int maxCachedinMs)
Deprecated.
Set the maximum time a broadcasted message can stay cached.
|
void |
start()
Deprecated.
Start
|
void |
stop()
Deprecated.
Stop
|
protected final java.util.List<BroadcasterCacheBase.CachedMessage> queue
protected java.util.concurrent.ScheduledExecutorService reaper
protected int maxCachedinMs
public final void start()
start in interface BroadcasterCachepublic void setExecutorService(java.util.concurrent.ScheduledExecutorService reaper)
public final void stop()
stop in interface BroadcasterCachepublic final void addToCache(java.lang.String id,
AtmosphereResource resource,
java.lang.Object object)
AtmosphereResource from the cacheaddToCache in interface BroadcasterCacheresource - AtmosphereResourceobject - a broadcasted message.public abstract void cache(AtmosphereResource r, BroadcasterCacheBase.CachedMessage cm)
r - AtmosphereResource.cm - BroadcasterCacheBase.CachedMessagepublic abstract BroadcasterCacheBase.CachedMessage retrieveLastMessage(AtmosphereResource r)
AtmosphereResource.r - AtmosphereResource.BroadcasterCacheBase.CachedMessage, or null if not matched.public final java.util.List<java.lang.Object> retrieveFromCache(java.lang.String id,
AtmosphereResource r)
AtmosphereResourceretrieveFromCache in interface BroadcasterCacher - AtmosphereResourceList of messages (String).public int getMaxCachedinMs()
public void setMaxCachedinMs(int maxCachedinMs)
maxCachedinMs - time in millisecondsCopyright © 2018. All Rights Reserved.