public class ExperimentRegistry extends AbstractManagedDynamicCacheRegistry
Modifier and Type | Field and Description |
---|---|
static java.lang.String | CLASSNAME
The name of this class.
|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
ExperimentRegistry()
The default constructor for this class.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object | createKey(java.lang.String strKey)
This method creates a cache key from the string representation of the key.
|
java.lang.String | createKeyString(TypedProperty prop)
This method creates a string representation of a cache key based on the input properties.
|
ExperimentCache | getCachedExperiment(java.lang.Integer experimentId)
This method returns the cached experiment object with the given experiment ID.
|
java.util.ArrayList | getCachedExperiments(java.lang.Integer storeElementTypeId, java.lang.Integer storeId, java.sql.Timestamp currentTime)
This method takes a store element type ID, store ID, and the current time, and according to the experiment schedule, populates the cached experiment object class with the content of the experiments that will be shown to all store elements of the given type in the given store.
|
static ExperimentRegistry | getInstance()
This method returns an instance of this registry class.
|
int | getRandomNumber(int maxLimit)
This method returns a randomly generated integer value between 0 (inclusive) and the specified value (exclusive).
|
void | populate(com.ibm.commerce.registry.LRUDynamicHashtable aCache)
This method populates the given cache object during server start up and refresh of this cache.
|
void | refresh()
This method refreshes registry entries from the database.
|
void | refresh(CommandContext commandContext)
This method performs a refresh to the entire experiment cache.
|
java.lang.Object | retrieve(java.lang.Object key)
This method retrieves an experiment of the given key from the database, populates its data into an experiment cache object and returns it to the caller of this method.
|
void | update(CommandContext commandContext, java.lang.String actionType, java.lang.Integer experimentId, java.lang.String experimentStatus)
This method performs an update to the specified experiment in the cache.
|
void | update(java.lang.String action, java.lang.Object key)
This method updates an element in the registry.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
public ExperimentRegistry()
public java.lang.Object createKey(java.lang.String strKey) throws java.lang.Exception
public java.lang.String createKeyString(TypedProperty prop) throws java.lang.Exception
public ExperimentCache getCachedExperiment(java.lang.Integer experimentId)
public java.util.ArrayList getCachedExperiments(java.lang.Integer storeElementTypeId, java.lang.Integer storeId, java.sql.Timestamp currentTime)
public static ExperimentRegistry getInstance()
public int getRandomNumber(int maxLimit)
public void populate(com.ibm.commerce.registry.LRUDynamicHashtable aCache) throws java.lang.Exception
public void refresh() throws java.lang.Exception
public void refresh(CommandContext commandContext) throws ECException
public java.lang.Object retrieve(java.lang.Object key) throws java.lang.Exception
public void update(java.lang.String action, java.lang.Object key) throws java.lang.Exception
public void update(CommandContext commandContext, java.lang.String actionType, java.lang.Integer experimentId, java.lang.String experimentStatus) throws ECException