Interface OptimizingTriggerCreator
-
public interface OptimizingTriggerCreator
Adds recompute triggers to objects in an optimized way: - The triggers are set to a given time in future (e.g. 1 minute from now). - If more requests to create triggers to the same object come before that time comes (minus some safety margin, e.g. 2 seconds), their creation is skipped. Currently we deal only with the recompute triggers. Other types can be added as necessary. The deduplication currently assumes the requests are of the same kind (i.e. either name-based or OID-based).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
createForNamedObject(@NotNull Class<? extends ObjectType> type, @NotNull String name)
Creates a trigger for the object with the given name.boolean
createForNamedUser(@NotNull String name)
Creates a trigger for the user with the given name.boolean
createForObject(@NotNull Class<? extends ObjectType> type, @NotNull String oid)
Creates a trigger to the user with the given OID.
-
-
-
Method Detail
-
createForNamedUser
boolean createForNamedUser(@NotNull @NotNull String name) throws SchemaException, ObjectAlreadyExistsException, ObjectNotFoundException
Creates a trigger for the user with the given name.- Returns:
- true if the trigger was really added; false if it already existed or could not be added (Note that if the object cannot be found by the name, currently no exception is reported.)
- Throws:
SchemaException
ObjectAlreadyExistsException
ObjectNotFoundException
-
createForNamedObject
boolean createForNamedObject(@NotNull @NotNull Class<? extends ObjectType> type, @NotNull @NotNull String name) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException
Creates a trigger for the object with the given name.- Returns:
- true if the trigger was really added; false if it already existed or could not be added (Note that if the object cannot be found by the name, currently no exception is reported.)
- Throws:
ObjectAlreadyExistsException
ObjectNotFoundException
SchemaException
-
createForObject
boolean createForObject(@NotNull @NotNull Class<? extends ObjectType> type, @NotNull @NotNull String oid) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException
Creates a trigger to the user with the given OID.- Returns:
- true if the trigger was really added; false if it already existed or could not be added
- Throws:
ObjectAlreadyExistsException
ObjectNotFoundException
SchemaException
-
-