org.apache.derby.iapi.services.property
Interface PropertySetCallback

All Known Subinterfaces:
LockFactory
All Known Implementing Classes:
AbstractPool, AuthenticationServiceBase, BasicAuthenticationServiceImpl, BasicDatabase, ConcurrentPool, GenericLanguageConnectionFactory, JNDIAuthenticationService, LanguageDbPropertySetter, NoneAuthenticationServiceImpl, RAMAccessManager, RllRAMAccessManager, SinglePool, SlaveDatabase, SpecificAuthenticationServiceImpl

public interface PropertySetCallback


Method Summary
 Serviceable apply(java.lang.String key, java.io.Serializable value, java.util.Dictionary p)
          Apply a property change.
 void init(boolean dbOnly, java.util.Dictionary p)
          Initialize the properties for this callback.
 java.io.Serializable map(java.lang.String key, java.io.Serializable value, java.util.Dictionary p)
          Map a proposed new value for a property to an official value.
 boolean validate(java.lang.String key, java.io.Serializable value, java.util.Dictionary p)
          Validate a property change.
 

Method Detail

init

void init(boolean dbOnly,
          java.util.Dictionary p)
Initialize the properties for this callback. Called when addPropertySetNotification() is called with a non-null transaction controller. This allows code to set read its initial property values at boot time.

Code within an init() method should use the 3 argument PropertyUtil method getPropertyFromSet() to obtain a property's value.

Parameters:
dbOnly - true if only per-database properties are to be looked at
p - the complete set of per-database properties.

validate

boolean validate(java.lang.String key,
                 java.io.Serializable value,
                 java.util.Dictionary p)
                 throws StandardException
Validate a property change.

Parameters:
key - Property key for the property being set
value - proposed new value for the property being set or null if the property is being dropped.
p - Property set before the change. SettingProperty may read but must never change p.
Returns:
true if this object was interested in this property, false otherwise.
Throws:
StandardException - Oh well.

apply

Serviceable apply(java.lang.String key,
                  java.io.Serializable value,
                  java.util.Dictionary p)
                  throws StandardException
Apply a property change. Will only be called after validate has been called and only if validate returned true. If this method is called then the new value is the value to be used, ie. the property is not set in the overriding JVM system set.

Parameters:
key - Property key for the property being set
value - proposed new value for the property being set or null if the property is being dropped.
p - Property set before the change. SettingProperty may read but must never change p.
Returns:
post commit work for the property change.
Throws:
StandardException - Oh well.

map

java.io.Serializable map(java.lang.String key,
                         java.io.Serializable value,
                         java.util.Dictionary p)
                         throws StandardException
Map a proposed new value for a property to an official value. Will only be called after apply() has been called.

Parameters:
key - Property key for the property being set
value - proposed new value for the property being set or null if the property is being dropped.
p - Property set before the change. SettingProperty may read but must never change p.
Returns:
new value for the change
Throws:
StandardException - Oh well.

Built on Thu 2011-03-10 11:54:14+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.