public interface ConditionalStoreMutation<T> extends Mutation<T>
Mutation
and allows for a store operation not to occur
if the object it is being applied to is not modified.
By implementing this interface you can avoid a store operation from occurring if the object it is be applied to is not modified.
For example:
Mutation<IRiakObject> m = new ConditionalStoreMutation<IRiakObject>() {
private boolean modified;
@Override
IRiakObject apply(IRiakObject original) {
// I didn't do anything!
modifed = false;
}
@Overrive
boolean hasMutated() {
return modified;
}
};
Modifier and Type | Method and Description |
---|---|
boolean |
hasMutated() |
Copyright © 2013. All Rights Reserved.