org.atmosphere.cache
Class BroadcasterCacheBase

java.lang.Object
  extended by org.atmosphere.cache.BroadcasterCacheBase
All Implemented Interfaces:
BroadcasterCache

Deprecated.

@Deprecated
public abstract class BroadcasterCacheBase
extends Object
implements BroadcasterCache

Abstract BroadcasterCache which is used to implement headers or query parameters or session based caching. NOTE: This cache is deprecated, use AbstractBroadcasterCache instead.

Author:
Jeanfrancois Arcand

Nested Class Summary
protected static class BroadcasterCacheBase.CachedMessage
          Deprecated.  
 
Nested classes/interfaces inherited from interface org.atmosphere.cpr.BroadcasterCache
BroadcasterCache.STRATEGY
 
Field Summary
protected  int maxCachedinMs
          Deprecated.  
protected  List<BroadcasterCacheBase.CachedMessage> queue
          Deprecated.  
protected  ScheduledExecutorService reaper
          Deprecated.  
 
Fields inherited from interface org.atmosphere.cpr.BroadcasterCache
BROADCASTER_CACHE_TRACKER
 
Constructor Summary
BroadcasterCacheBase()
          Deprecated.  
 
Method Summary
 void addToCache(String id, AtmosphereResource resource, 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.
 List<Object> retrieveFromCache(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(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queue

protected final List<BroadcasterCacheBase.CachedMessage> queue
Deprecated. 

reaper

protected ScheduledExecutorService reaper
Deprecated. 

maxCachedinMs

protected int maxCachedinMs
Deprecated. 
Constructor Detail

BroadcasterCacheBase

public BroadcasterCacheBase()
Deprecated. 
Method Detail

start

public final void start()
Deprecated. 
Start

Specified by:
start in interface BroadcasterCache

setExecutorService

public void setExecutorService(ScheduledExecutorService reaper)
Deprecated. 

stop

public final void stop()
Deprecated. 
Stop

Specified by:
stop in interface BroadcasterCache

addToCache

public final void addToCache(String id,
                             AtmosphereResource resource,
                             Object object)
Deprecated. 
Start tracking messages associated with AtmosphereResource from the cache

Specified by:
addToCache in interface BroadcasterCache
resource - AtmosphereResource
object - a broadcasted message.

cache

public abstract void cache(AtmosphereResource r,
                           BroadcasterCacheBase.CachedMessage cm)
Deprecated. 
Cache the last message broadcasted.

Parameters:
r - AtmosphereResource.
cm - BroadcasterCacheBase.CachedMessage

retrieveLastMessage

public abstract BroadcasterCacheBase.CachedMessage retrieveLastMessage(AtmosphereResource r)
Deprecated. 
Return the last message broadcasted to the AtmosphereResource.

Parameters:
r - AtmosphereResource.
Returns:
a BroadcasterCacheBase.CachedMessage, or null if not matched.

retrieveFromCache

public final List<Object> retrieveFromCache(String id,
                                            AtmosphereResource r)
Deprecated. 
Retrieve messages associated with AtmosphereResource

Specified by:
retrieveFromCache in interface BroadcasterCache
r - AtmosphereResource
Returns:
a List of messages (String).

getMaxCachedinMs

public int getMaxCachedinMs()
Deprecated. 
Get the maximum time a broadcasted message can stay cached.

Returns:
Get the maximum time a broadcasted message can stay cached.

setMaxCachedinMs

public void setMaxCachedinMs(int maxCachedinMs)
Deprecated. 
Set the maximum time a broadcasted message can stay cached.

Parameters:
maxCachedinMs - time in milliseconds


Copyright © 2013. All Rights Reserved.