|
Oracle Corporation | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Interface to configuration store.
The implementation holds an internal cache which is automatically
distributed when values change, so service implementation shall not
hold any cached values. It should instead register a cache listener
if it needs to be notified when values change.
Note: This utility is intended for configuration parameters only,
not traffic data.
| Field Summary | |
static int |
KEY_LENGTH
Maximum length of key values. |
static int |
NAME_LENGTH
Maximum length of scope values. |
static int |
STORE_TYPE_LOCAL
Local (non distributed) service configuration data. |
static int |
STORE_TYPE_SHARED
Shared (distributed between WLNG instances) service configuration. |
static int |
VALUE_LENGTH
Maximum length of values. |
| Method Summary | |
void |
addListener(ConfigurationListener listener)
Add a cache listener for notifications of values changed on other instances of the store. |
Boolean |
getBoolean(String key)
Get Boolean value for a certain key. |
Integer |
getInteger(String key)
Get Integer value for a certain key. |
Long |
getLong(String key)
Get Long value for a certain key. |
Serializable |
getSerializable(String key)
Get Serializable value for a certain key. |
String |
getStoreName()
Get store name. |
int |
getStoreType()
Get store type. |
String |
getString(String key)
Get String value for a certain key. |
void |
initialize(String key,
Boolean defaultValue)
Initialize key to specified default value of Boolean type. |
void |
initialize(String key,
Integer defaultValue)
Initialize key to specified default value of Integer type. |
void |
initialize(String key,
Long defaultValue)
Initialize key to specified default value of Long type. |
void |
initialize(String key,
Serializable defaultValue)
Initialize key to specified default value of Serializable type. |
void |
initialize(String key,
String defaultValue)
Initialize key to specified default value of String type. |
Set |
keySet()
Returns a set view of the keys contained in this map. |
void |
removeListener(ConfigurationListener listener)
Remove a previously added cache listener. |
void |
setBoolean(String key,
Boolean value)
Set value for a certain key. |
void |
setInteger(String key,
Integer value)
Set value for a certain key. |
void |
setLong(String key,
Long value)
Set value for a certain key. |
void |
setSerializable(String key,
Serializable value)
Set Serializable value for a certain key. |
void |
setString(String key,
String value)
Set value for a certain key. |
| Field Detail |
public static final int KEY_LENGTH
public static final int NAME_LENGTH
public static final int STORE_TYPE_LOCAL
public static final int STORE_TYPE_SHARED
public static final int VALUE_LENGTH
| Method Detail |
public void addListener(ConfigurationListener listener)
listener - configuration change listener.
public Boolean getBoolean(String key)
throws InvalidTypeException,
NotInitializedException
key - The key.
InvalidTypeException - if the key was initialized
to other type than Boolean.
NotInitializedException - if the parameter has
not been initialized.
public Integer getInteger(String key)
throws InvalidTypeException,
NotInitializedException
key - The key.
InvalidTypeException - if the key was initialized
to other type than Integer.
NotInitializedException - if the parameter has
not been initialized.
public Long getLong(String key)
throws InvalidTypeException,
NotInitializedException
key - The key.
InvalidTypeException - if the key was initialized
to other type than Long.
NotInitializedException - if the parameter has
not been initialized.
public Serializable getSerializable(String key)
throws InvalidTypeException,
NotInitializedException
key - The key.
InvalidTypeException - if the key was initialized
to other type than Serializable.
NotInitializedException - if the parameter has
not been initialized.public String getStoreName()
public int getStoreType()
public String getString(String key)
throws InvalidTypeException,
NotInitializedException
key - The key.
InvalidTypeException - if the key was initialized
to other type than String.
NotInitializedException - if the parameter has
not been initialized.
public void initialize(String key,
Boolean defaultValue)
throws InvalidTypeException,
ConfigurationException
key - The key.defaultValue - The default value.
InvalidTypeException - if the key was initialized
to other type than Boolean.
ConfigurationException - if there was an error
communicating with the database.
public void initialize(String key,
Integer defaultValue)
throws InvalidTypeException,
ConfigurationException
key - The key.defaultValue - The default value.
InvalidTypeException - if the key was initialized
to other type than Integer.
ConfigurationException - if there was an error
communicating with the database.
public void initialize(String key,
Long defaultValue)
throws InvalidTypeException,
ConfigurationException
key - The key.defaultValue - The default value.
InvalidTypeException - if the key was initialized
to other type than Long.
ConfigurationException - if there was an error
communicating with the database.
public void initialize(String key,
Serializable defaultValue)
throws InvalidTypeException,
ConfigurationException
key - The key.defaultValue - The default Serializable value.
InvalidTypeException - if the key was initialized
to other type than Serializable.
ConfigurationException - if there was an error
communicating with the database.
public void initialize(String key,
String defaultValue)
throws InvalidTypeException,
ConfigurationException
key - The key.defaultValue - The default value.
InvalidTypeException - if the key was initialized
to other type than String.
ConfigurationException - if there was an error
communicating with the database.public Set keySet()
public void removeListener(ConfigurationListener listener)
listener - configuration change listener.
public void setBoolean(String key,
Boolean value)
throws InvalidTypeException,
NotInitializedException,
ConfigurationException
key - The key.value - The value.
InvalidTypeException - if the key was initialized
to other type than Boolean.
NotInitializedException - if the parameter has
not been initialized.
ConfigurationException - if there was an error
communicating with the database.
public void setInteger(String key,
Integer value)
throws InvalidTypeException,
NotInitializedException,
ConfigurationException
key - The key.value - The value.
InvalidTypeException - if the key was initialized
to other type than Integer.
NotInitializedException - if the parameter has
not been initialized.
ConfigurationException - if there was an error
communicating with the database.
public void setLong(String key,
Long value)
throws InvalidTypeException,
NotInitializedException,
ConfigurationException
key - The key.value - The value.
InvalidTypeException - if the key was initialized
to other type than Long.
NotInitializedException - if the parameter has
not been initialized.
ConfigurationException - if there was an error
communicating with the database.
public void setSerializable(String key,
Serializable value)
throws InvalidTypeException,
NotInitializedException,
ConfigurationException
key - The key.value - The Serializable value.
InvalidTypeException - if the key was initialized
to other type than Serializable.
NotInitializedException - if the parameter has
not been initialized.
ConfigurationException - if there was an error
communicating with the database.
public void setString(String key,
String value)
throws InvalidTypeException,
NotInitializedException,
ConfigurationException
key - The key.value - The value.
InvalidTypeException - if the key was initialized
to other type than String.
NotInitializedException - if the parameter has
not been initialized.
ConfigurationException - if there was an error
communicating with the database.
|
Oracle Corporation | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||