org.tango.server.cache
Class PollingManager

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

public final class PollingManager
extends java.lang.Object

Manage all polling stuff of a device

Author:
ABEILLE

Constructor Summary
PollingManager(java.lang.String deviceName, TangoCacheManager cacheManager, java.util.List<AttributeImpl> attributeList, java.util.List<CommandImpl> commandList, int minPolling, java.util.Map<java.lang.String,java.lang.Integer> minCommandPolling, java.util.Map<java.lang.String,java.lang.Integer> minAttributePolling, java.util.Map<java.lang.String,java.lang.Integer> cmdPollRingDepth, java.util.Map<java.lang.String,java.lang.Integer> attrPollRingDepth)
           
 
Method Summary
 void addAttributePolling(java.lang.String attributeName, int pollingPeriod)
          Add attribute polling
 void addCommandPolling(java.lang.String commandName, int pollingPeriod)
          Add command polling.
 void configurePolling(AttributeImpl attribute)
           
 void configurePolling(CommandImpl command)
           
 AttributeValue getAttributeCacheElement(AttributeImpl att)
           
 java.lang.Object getCommandCacheElement(CommandImpl cmd)
           
 void initPolling()
           
 void removeAll()
           
 void removeAttributePolling(java.lang.String attributeName)
          Remove attribute polling
 void removeCommandPolling(java.lang.String commandName)
          Remove command polling
 void setPollAttributes(java.util.Map<java.lang.String,java.lang.Integer> pollAttributes)
           
 void setPollRingDepth(int pollRingDepth)
           
 void startPolling()
          Start already configured polling
 void stopPolling()
          Stop all polling
 void triggerPolling(java.lang.String objectName)
          Update polling cache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PollingManager

public PollingManager(java.lang.String deviceName,
                      TangoCacheManager cacheManager,
                      java.util.List<AttributeImpl> attributeList,
                      java.util.List<CommandImpl> commandList,
                      int minPolling,
                      java.util.Map<java.lang.String,java.lang.Integer> minCommandPolling,
                      java.util.Map<java.lang.String,java.lang.Integer> minAttributePolling,
                      java.util.Map<java.lang.String,java.lang.Integer> cmdPollRingDepth,
                      java.util.Map<java.lang.String,java.lang.Integer> attrPollRingDepth)
Method Detail

initPolling

public void initPolling()
                 throws fr.esrf.Tango.DevFailed
Throws:
fr.esrf.Tango.DevFailed

configurePolling

public void configurePolling(CommandImpl command)
                      throws fr.esrf.Tango.DevFailed
Throws:
fr.esrf.Tango.DevFailed

configurePolling

public void configurePolling(AttributeImpl attribute)
                      throws fr.esrf.Tango.DevFailed
Throws:
fr.esrf.Tango.DevFailed

triggerPolling

public void triggerPolling(java.lang.String objectName)
                    throws fr.esrf.Tango.DevFailed
Update polling cache

Parameters:
objectName - The command or attribute to update
Throws:
fr.esrf.Tango.DevFailed

addCommandPolling

public void addCommandPolling(java.lang.String commandName,
                              int pollingPeriod)
                       throws fr.esrf.Tango.DevFailed
Add command polling. Init command cannot be polled. Only command with parameter void can be polled

Parameters:
commandName - the command to poll
pollingPeriod - the polling period
Throws:
fr.esrf.Tango.DevFailed

stopPolling

public void stopPolling()
Stop all polling


startPolling

public void startPolling()
Start already configured polling


addAttributePolling

public void addAttributePolling(java.lang.String attributeName,
                                int pollingPeriod)
                         throws fr.esrf.Tango.DevFailed
Add attribute polling

Parameters:
attributeName - the attribute to poll
pollingPeriod - the polling period
Throws:
fr.esrf.Tango.DevFailed

removeAttributePolling

public void removeAttributePolling(java.lang.String attributeName)
                            throws fr.esrf.Tango.DevFailed
Remove attribute polling

Parameters:
attributeName - the attribute
Throws:
fr.esrf.Tango.DevFailed

removeCommandPolling

public void removeCommandPolling(java.lang.String commandName)
                          throws fr.esrf.Tango.DevFailed
Remove command polling

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

removeAll

public void removeAll()

getCommandCacheElement

public java.lang.Object getCommandCacheElement(CommandImpl cmd)
                                        throws fr.esrf.Tango.DevFailed
Throws:
fr.esrf.Tango.DevFailed

getAttributeCacheElement

public AttributeValue getAttributeCacheElement(AttributeImpl att)
                                        throws net.sf.ehcache.CacheException
Throws:
net.sf.ehcache.CacheException

setPollRingDepth

public void setPollRingDepth(int pollRingDepth)

setPollAttributes

public void setPollAttributes(java.util.Map<java.lang.String,java.lang.Integer> pollAttributes)


Copyright © 2012-2017. All Rights Reserved.