public interface IGlobalConstraint
Certain global constraints can have inner state for the validation. In this case a new instance is necessary for
every new thread, and the createNew
method should not return the same instance more than once.
Modifier and Type | Method and Description |
---|---|
boolean |
checkGlobalConstraint(ThreadContext context)
Checks whether the current state satisfies the global constraint.
|
IGlobalConstraint |
createNew()
Returns an instance of the
IGlobalConstraint . |
java.lang.String |
getName()
Returns the name of the global constraint.
|
void |
init(ThreadContext context)
Initializes the global constraint.
|
java.lang.String getName()
boolean checkGlobalConstraint(ThreadContext context)
context
- The ThreadContext
which contains the necessary information.void init(ThreadContext context)
context
- The ThreadContext
.IGlobalConstraint createNew()
IGlobalConstraint
. If it returns the same instance, all the methods has to be
thread save as they are called concurrently.