mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUACAMOLE-926: Set JDBC to batch mode and just do operations one at a time.
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
package org.apache.guacamole.net.auth;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
import org.apache.guacamole.GuacamoleException;
|
||||
|
||||
@@ -199,29 +198,6 @@ public interface Directory<ObjectType extends Identifiable> {
|
||||
void add(ObjectType object)
|
||||
throws GuacamoleException;
|
||||
|
||||
/**
|
||||
* Adds the given objects to the overall set. If new identifiers are
|
||||
* created for any of the the added objects, the identifiers will be
|
||||
* automatically assigned via setIdentifier().
|
||||
*
|
||||
* @param objects
|
||||
* The objects to add.
|
||||
*
|
||||
* @throws GuacamoleException
|
||||
* If an error occurs while adding any of the objects, or if adding
|
||||
* the objects is not allowed.
|
||||
*/
|
||||
default void add(Collection<ObjectType> objects)
|
||||
throws GuacamoleException {
|
||||
|
||||
// Add each object individually by default
|
||||
Iterator<ObjectType> iterator = objects.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
add(iterator.next());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the stored object with the data contained in the given object.
|
||||
*
|
||||
@@ -233,25 +209,6 @@ public interface Directory<ObjectType extends Identifiable> {
|
||||
void update(ObjectType object)
|
||||
throws GuacamoleException;
|
||||
|
||||
/**
|
||||
* Updates the stored objects with the data contained in the given objects.
|
||||
*
|
||||
* @param objects The objects which will supply the data for the update.
|
||||
*
|
||||
* @throws GuacamoleException If an error occurs while updating the objects,
|
||||
* or if updating an object is not allowed.
|
||||
*/
|
||||
default void update(Collection<ObjectType> objects)
|
||||
throws GuacamoleException {
|
||||
|
||||
// Update each object individually by default
|
||||
Iterator<ObjectType> iterator = objects.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
update(iterator.next());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the object with the given identifier from the overall set.
|
||||
*
|
||||
@@ -262,25 +219,6 @@ public interface Directory<ObjectType extends Identifiable> {
|
||||
*/
|
||||
void remove(String identifier) throws GuacamoleException;
|
||||
|
||||
/**
|
||||
* Removes all object with any of the given identifier from the overall set.
|
||||
*
|
||||
* @param identifiers The identifiers of the objects to remove.
|
||||
*
|
||||
* @throws GuacamoleException If an error occurs while removing an object,
|
||||
* or if removing an object is not allowed.
|
||||
*/
|
||||
default void remove(Collection<String> identifiers)
|
||||
throws GuacamoleException {
|
||||
|
||||
// Remove each object individually by default
|
||||
Iterator<String> iterator = identifiers.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
remove(iterator.next());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to perform the provided operation atomically if possible. If the
|
||||
* operation can be performed atomically, the atomic flag will be set to
|
||||
|
Reference in New Issue
Block a user