X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fxmlrouter%2Fimpl%2FXMLRouterConfiguration.java;h=a57a84569e8092f044878f422a466018d2887291;hb=f8027d76e1c3e517a8b80a3476f51adee845fc5b;hp=25ae3313151cb70d2a7f6684ab231ce704f3e93a;hpb=f70baadfd579f4d3aa2e8c9ee7d758fb37d7872f;p=xmlrouter diff --git a/impl/src/main/java/org/wamblee/xmlrouter/impl/XMLRouterConfiguration.java b/impl/src/main/java/org/wamblee/xmlrouter/impl/XMLRouterConfiguration.java index 25ae331..a57a845 100644 --- a/impl/src/main/java/org/wamblee/xmlrouter/impl/XMLRouterConfiguration.java +++ b/impl/src/main/java/org/wamblee/xmlrouter/impl/XMLRouterConfiguration.java @@ -27,22 +27,21 @@ package org.wamblee.xmlrouter.impl; 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 @@ -51,20 +50,11 @@ public interface XMLRouterConfiguration { void endPublishEvent(); /** - * @return Configuration data. - */ - ExtendedRouterConfig getRouterConfig(); - - /** - * Sets the configuration and updates 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. */ void setRouterConfig(ExtendedRouterConfig aConfig); - - /** - * @return Transformation paths (derived data). - */ - TransformationPaths getTransformations(); }