summaryrefslogtreecommitdiff
path: root/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStore.java
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStore.java')
-rwxr-xr-xqpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStore.java34
1 files changed, 14 insertions, 20 deletions
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStore.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStore.java
index 10e56f1f71..918a9b0134 100755
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStore.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/DurableConfigurationStore.java
@@ -23,6 +23,8 @@ package org.apache.qpid.server.store;
import java.util.Map;
import java.util.UUID;
+import org.apache.qpid.server.model.ConfiguredObject;
+
public interface DurableConfigurationStore
{
String STORE_TYPE = "storeType";
@@ -43,48 +45,40 @@ public interface DurableConfigurationStore
/**
* Recovers configuration from the store using given recovery handler
- *
+ * @param parent parent
* @param recoveryHandler recovery handler
*/
- void recoverConfigurationStore(ConfigurationRecoveryHandler recoveryHandler) throws StoreException;
+ void recoverConfigurationStore(ConfiguredObject<?> parent, ConfigurationRecoveryHandler recoveryHandler) throws StoreException;
/**
* Makes the specified object persistent.
*
- * @param id The id of the object to persist.
- * @param type The type of the object to persist
- * @param attributes the attributes of the object to persist
+ * @param object The object to persist.
*
* @throws StoreException If the operation fails for any reason.
*/
- void create(UUID id, String type, Map<String, Object> attributes) throws StoreException;
+ void create(ConfiguredObjectRecord object) throws StoreException;
/**
- * Removes the specified persistent configured object.
+ * Removes the specified persistent configured objects.
*
- * @param id The id of the object to remove.
- * @param type The type of the object to remove
+ * @param objects The objects to remove.
*
* @throws StoreException If the operation fails for any reason.
*/
- void remove(UUID id, String type) throws StoreException;
-
- public UUID[] removeConfiguredObjects(UUID... objects) throws StoreException;
+ public UUID[] remove(ConfiguredObjectRecord... objects) throws StoreException;
/**
- * Updates the specified object in the persistent store, IF it is already present. If the object
- * is not present in the store, it will not be added.
+ * Updates the specified objects in the persistent store, IF it is already present. If the object
+ * is not present in the store, it will only be added if createIfNecessary is set to true, otherwise an exception
+ * will be thrown.
*
- * @param id The id of the object to update.
- * @param type The type of the object to update
- * @param attributes the updated attributes
+ * @param createIfNecessary if false then will fail if the object does not exist.
+ * @param records the records to update
*
* @throws StoreException If the operation fails for any reason.
*/
- void update(UUID id, String type, Map<String, Object> attributes) throws StoreException;
-
-
void update(boolean createIfNecessary, ConfiguredObjectRecord... records) throws StoreException;