public interface XMLRouterConfiguration {
/**
- * To be called before the configuration is updated. Corresponds to write
- * lock acquire.
+ * To be called before the configuration is used. Corresponds to read lock
+ * acquire.
*/
- void startConfigurationChange();
+ void startPublishEvent();
/**
- * To be called after the configuration is updated. Corresponds to write
- * lock acquire.
+ * @return Configuration data. {@link #startPublishEvent()} must have been
+ * called before doing this.
*/
- void endConfigurationChange();
+ ExtendedRouterConfig getRouterConfig();
/**
- * To be called before the configuration is used. Corresponds to read lock
- * acquire.
+ * @return Transformation paths (derived data).
*/
- void startPublishEvent();
+ TransformationPaths getTransformations();
/**
* To be called after the configuration is used. Corresponds to read lock
void endPublishEvent();
/**
- * @return Configuration data.
- */
- ExtendedRouterConfig routerConfig();
-
- /**
- * @return Transformation paths (derived data).
+ * Atomically sets the configuration and updates derived data. There will be
+ * a short time during which read attempts will fail.
+ *
+ * @param aConfig
+ * Configuration to set.
*/
- TransformationPaths transformations();
+ void setRouterConfig(ExtendedRouterConfig aConfig);
}