org.tango.server.cache
Class TangoCacheManager

java.lang.Object
  extended by org.tango.server.cache.TangoCacheManager

public final class TangoCacheManager
extends java.lang.Object

Manage cache for attributes/commands of a Tango device

Author:
ABEILLE

Constructor Summary
TangoCacheManager(java.lang.String deviceName, DeviceLock deviceLock, AroundInvokeImpl aroundInvoke)
           
 
Method Summary
 net.sf.ehcache.constructs.blocking.SelfPopulatingCache getAttributeCache(AttributeImpl attr)
          Get cache of an attribute
 net.sf.ehcache.constructs.blocking.SelfPopulatingCache getCommandCache(CommandImpl cmd)
          Get cache of a command
static java.util.List<java.lang.String> getPolledDevices()
           
static int getPoolSize()
           
static void initPoolConf()
          Retrieve the ordered list of polled devices
 void removeAll()
          Remove all polling
 void removeAttributePolling(AttributeImpl attr)
          Remove polling of an attribute
 void removeCommandPolling(CommandImpl command)
          Remove polling of a command
static void setPollSize(int poolSize)
           
static void shutdown()
           
 void start()
          Start all polling
 void startAttributePolling(AttributeImpl attr)
          Start attribute polling
 void startCommandPolling(CommandImpl command)
          Start command polling
 void startStateStatusPolling(CommandImpl command, AttributeImpl attribute)
           
 void stop()
          Stop all polling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TangoCacheManager

public TangoCacheManager(java.lang.String deviceName,
                         DeviceLock deviceLock,
                         AroundInvokeImpl aroundInvoke)
Method Detail

shutdown

public static void shutdown()

initPoolConf

public static void initPoolConf()
                         throws fr.esrf.Tango.DevFailed
Retrieve the ordered list of polled devices

Throws:
fr.esrf.Tango.DevFailed

setPollSize

public static void setPollSize(int poolSize)

startStateStatusPolling

public void startStateStatusPolling(CommandImpl command,
                                    AttributeImpl attribute)

startCommandPolling

public void startCommandPolling(CommandImpl command)
                         throws fr.esrf.Tango.DevFailed
Start command polling

Parameters:
command - The command to poll
Throws:
fr.esrf.Tango.DevFailed

startAttributePolling

public void startAttributePolling(AttributeImpl attr)
                           throws fr.esrf.Tango.DevFailed
Start attribute polling

Parameters:
attr - The attribute to poll
Throws:
fr.esrf.Tango.DevFailed

removeAttributePolling

public void removeAttributePolling(AttributeImpl attr)
                            throws fr.esrf.Tango.DevFailed
Remove polling of an attribute

Parameters:
attr -
Throws:
fr.esrf.Tango.DevFailed

removeAll

public void removeAll()
Remove all polling


removeCommandPolling

public void removeCommandPolling(CommandImpl command)
                          throws fr.esrf.Tango.DevFailed
Remove polling of a command

Parameters:
command -
Throws:
fr.esrf.Tango.DevFailed

start

public void start()
Start all polling


stop

public void stop()
Stop all polling


getAttributeCache

public net.sf.ehcache.constructs.blocking.SelfPopulatingCache getAttributeCache(AttributeImpl attr)
Get cache of an attribute

Parameters:
attr - the attribute
Returns:
the attribute cache

getCommandCache

public net.sf.ehcache.constructs.blocking.SelfPopulatingCache getCommandCache(CommandImpl cmd)
Get cache of a command

Parameters:
cmd - The command
Returns:
The command cache

getPoolSize

public static int getPoolSize()

getPolledDevices

public static java.util.List<java.lang.String> getPolledDevices()


Copyright © 2012-2014. All Rights Reserved.