Package org.infinispan.schematic.internal.delta

Examples of org.infinispan.schematic.internal.delta.PutIfAbsentOperation


                        observer.clear(op.getParentPath());
                    } else if (operation instanceof PutOperation) {
                        PutOperation op = (PutOperation)operation;
                        observer.put(op.getParentPath(), op.getFieldName(), op.getNewValue());
                    } else if (operation instanceof PutIfAbsentOperation) {
                        PutIfAbsentOperation op = (PutIfAbsentOperation)operation;
                        if (op.isApplied()) {
                            observer.put(op.getParentPath(), op.getFieldName(), op.getNewValue());
                        }
                    } else if (operation instanceof RemoveOperation) {
                        RemoveOperation op = (RemoveOperation)operation;
                        if (op.isRemoved()) {
                            observer.remove(op.getParentPath(), op.getFieldName());
                        }
                    }
                }
            }
        }
View Full Code Here


    @Override
    protected Object doSetValueIfAbsent( String name,
                                         Object value ) {
        Object oldValue = super.doSetValue(name, value);
        observer.addOperation(new PutIfAbsentOperation(path, name, copy(value)));
        return oldValue;
    }
View Full Code Here

TOP

Related Classes of org.infinispan.schematic.internal.delta.PutIfAbsentOperation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.