com.espertech.esper.client
Class ConfigurationMethodRef

java.lang.Object
  extended by com.espertech.esper.client.ConfigurationMethodRef
All Implemented Interfaces:
java.io.Serializable

public class ConfigurationMethodRef
extends java.lang.Object
implements java.io.Serializable

Holds configuration information for data caches for use in method invocations in the from-clause.

See Also:
Serialized Form

Constructor Summary
ConfigurationMethodRef()
           
 
Method Summary
 ConfigurationDataCache getDataCacheDesc()
          Return a method invocation result data cache descriptor.
 void setExpiryTimeCache(double maxAgeSeconds, double purgeIntervalSeconds)
          Configures an expiry-time cache of the given maximum age in seconds and purge interval in seconds.
 void setExpiryTimeCache(double maxAgeSeconds, double purgeIntervalSeconds, ConfigurationCacheReferenceType cacheReferenceType)
          Configures an expiry-time cache of the given maximum age in seconds and purge interval in seconds.
 void setLRUCache(int size)
          Configures a LRU cache of the given size for the method invocation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationMethodRef

public ConfigurationMethodRef()
Method Detail

setLRUCache

public void setLRUCache(int size)
Configures a LRU cache of the given size for the method invocation.

Parameters:
size - is the maximum number of entries before method invocation results are evicted

setExpiryTimeCache

public void setExpiryTimeCache(double maxAgeSeconds,
                               double purgeIntervalSeconds)
Configures an expiry-time cache of the given maximum age in seconds and purge interval in seconds.

Specifies the cache reference type to be weak references. Weak reference cache entries become eligible for garbage collection and are removed from cache when the garbage collection requires so.

Parameters:
maxAgeSeconds - is the maximum number of seconds before a method invocation result is considered stale (also known as time-to-live)
purgeIntervalSeconds - is the interval at which the engine purges stale data from the cache

setExpiryTimeCache

public void setExpiryTimeCache(double maxAgeSeconds,
                               double purgeIntervalSeconds,
                               ConfigurationCacheReferenceType cacheReferenceType)
Configures an expiry-time cache of the given maximum age in seconds and purge interval in seconds. Also allows setting the reference type indicating whether garbage collection may remove entries from cache.

Parameters:
maxAgeSeconds - is the maximum number of seconds before a method invocation result is considered stale (also known as time-to-live)
purgeIntervalSeconds - is the interval at which the engine purges stale data from the cache
cacheReferenceType - specifies the reference type to use

getDataCacheDesc

public ConfigurationDataCache getDataCacheDesc()
Return a method invocation result data cache descriptor.

Returns:
cache descriptor

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com