org.terracotta.toolkit.nonstop
Interface NonStopConfigurationRegistry


public interface NonStopConfigurationRegistry

This class could be used for registering NonStopConfiguration.
Users are recommended to use NonStopConfigurationBuilder instead of directly using this class.

A user is allowed to register NonStopConfiguration for a ToolkitObjectType, an instance, a particular method in the ToolkitObject & a particular method for a particular instance.

If multiple configurations could match for a particular operation, then the order in which the NonStopConfiguration is determined as follows:


Method Summary
 NonStopConfiguration deregisterForInstance(String toolkitTypeName, ToolkitObjectType type)
          De-register the NonStopConfiguration associated with the ToolkitObjectType and whose instance name is passed in as param.
 NonStopConfiguration deregisterForInstanceMethod(String methodName, String toolkitTypeName, ToolkitObjectType type)
          De-register the NonStopConfiguration associated with the ToolkitObjectType and whose method name & instance name is passed in as param.
 NonStopConfiguration deregisterForType(ToolkitObjectType type)
          De-register the NonStopConfiguration associated with the ToolkitObjectType
 NonStopConfiguration deregisterForTypeMethod(String methodName, ToolkitObjectType type)
          De-register the NonStopConfiguration associated with the ToolkitObjectType and whose method name is passed in as param.
 long deregisterTimeoutForSearch(String instanceName, ToolkitObjectType objectType)
          De-register the timeout set for search.
 NonStopConfiguration getConfigForInstance(String toolkitTypeName, ToolkitObjectType type)
           
 NonStopConfiguration getConfigForInstanceMethod(String methodName, String toolkitTypeName, ToolkitObjectType type)
           
 NonStopConfiguration getConfigForType(ToolkitObjectType type)
           
 NonStopConfiguration getConfigForTypeMethod(String methodName, ToolkitObjectType type)
           
 long getTimeoutForSearch(String instanceName, ToolkitObjectType objectType)
           
 void registerForInstance(NonStopConfiguration config, String toolkitTypeName, ToolkitObjectType type)
          Register NonStopConfiguration for all the ToolkitObjectType which have the name passed in as the parameter.
 void registerForInstanceMethod(NonStopConfiguration config, String methodName, String toolkitTypeName, ToolkitObjectType type)
          Register NonStopConfiguration for the method in ToolkitObjectType and the instance name.
 void registerForType(NonStopConfiguration config, ToolkitObjectType... types)
          Register NonStopConfiguration for the all ToolkitObjectType passed in.
 void registerForTypeMethod(NonStopConfiguration config, String methodName, ToolkitObjectType type)
          Register NonStopConfiguration for the method in ToolkitObject
 void registerTimeoutForSearch(long timeout, String instanceName, ToolkitObjectType objectType)
          Register a different timeout for search operations.
Please note that the rest of the NonStopConfiguration is used which was registered for ToolkitObject instance.
 

Method Detail

registerForType

void registerForType(NonStopConfiguration config,
                     ToolkitObjectType... types)
Register NonStopConfiguration for the all ToolkitObjectType passed in.


registerForInstance

void registerForInstance(NonStopConfiguration config,
                         String toolkitTypeName,
                         ToolkitObjectType type)
Register NonStopConfiguration for all the ToolkitObjectType which have the name passed in as the parameter.


registerForTypeMethod

void registerForTypeMethod(NonStopConfiguration config,
                           String methodName,
                           ToolkitObjectType type)
Register NonStopConfiguration for the method in ToolkitObject


registerForInstanceMethod

void registerForInstanceMethod(NonStopConfiguration config,
                               String methodName,
                               String toolkitTypeName,
                               ToolkitObjectType type)
Register NonStopConfiguration for the method in ToolkitObjectType and the instance name.


registerTimeoutForSearch

void registerTimeoutForSearch(long timeout,
                              String instanceName,
                              ToolkitObjectType objectType)
Register a different timeout for search operations.
Please note that the rest of the NonStopConfiguration is used which was registered for ToolkitObject instance.

Throws:
IllegalArgumentException - if timeout <= 0

getConfigForType

NonStopConfiguration getConfigForType(ToolkitObjectType type)
Returns:
NonStopConfiguration for the ToolkitObjectType

getConfigForInstance

NonStopConfiguration getConfigForInstance(String toolkitTypeName,
                                          ToolkitObjectType type)
Returns:
NonStopConfiguration for the ToolkitObjectType and whose name is passed in as param.

getConfigForTypeMethod

NonStopConfiguration getConfigForTypeMethod(String methodName,
                                            ToolkitObjectType type)
Returns:
NonStopConfiguration for the ToolkitObjectType and whose method name is passed in as param.

getConfigForInstanceMethod

NonStopConfiguration getConfigForInstanceMethod(String methodName,
                                                String toolkitTypeName,
                                                ToolkitObjectType type)
Returns:
NonStopConfiguration for the ToolkitObjectType and whose instance name & method name is passed in as param.

getTimeoutForSearch

long getTimeoutForSearch(String instanceName,
                         ToolkitObjectType objectType)
Returns:
the timeout registered for search operations.
If the timeout was not registered, the searchTimeout setting from the nonstop configuration will be returned. If the searchTimeout was not specified in the nonstop configuration, the default search timeout will be returned.

deregisterForType

NonStopConfiguration deregisterForType(ToolkitObjectType type)
De-register the NonStopConfiguration associated with the ToolkitObjectType


deregisterForInstance

NonStopConfiguration deregisterForInstance(String toolkitTypeName,
                                           ToolkitObjectType type)
De-register the NonStopConfiguration associated with the ToolkitObjectType and whose instance name is passed in as param.


deregisterForTypeMethod

NonStopConfiguration deregisterForTypeMethod(String methodName,
                                             ToolkitObjectType type)
De-register the NonStopConfiguration associated with the ToolkitObjectType and whose method name is passed in as param.


deregisterForInstanceMethod

NonStopConfiguration deregisterForInstanceMethod(String methodName,
                                                 String toolkitTypeName,
                                                 ToolkitObjectType type)
De-register the NonStopConfiguration associated with the ToolkitObjectType and whose method name & instance name is passed in as param.


deregisterTimeoutForSearch

long deregisterTimeoutForSearch(String instanceName,
                                ToolkitObjectType objectType)
De-register the timeout set for search.



Copyright © 2014 Terracotta, Inc.. All Rights Reserved.