Package org.infinispan.schematic.internal.document

Examples of org.infinispan.schematic.internal.document.MutableArray


    }

    @Override
    public void rollback( MutableDocument delegate ) {
        if (actualIndex > -1) {
            MutableArray array = mutableParent(delegate);
            array.add(actualIndex, value);
        }
    }
View Full Code Here


        return actualIndex;
    }

    @Override
    public void replay( MutableDocument delegate ) {
        MutableArray array = mutableParent(delegate);
        actualIndex = array.indexOf(value);
        array.remove(actualIndex);
    }
View Full Code Here

    }

    @Override
    public synchronized void rollback( MutableDocument delegate ) {
        if (actualIndexes != null) {
            MutableArray array = mutableParent(delegate);
            // Add into the same locations ...
            int i = 0;
            for (Object value : values) {
                int index = actualIndexes[i++];
                if (index != -1) array.add(index, value);
            }
        }
    }
View Full Code Here

    @Override
    public synchronized void replay( MutableDocument delegate ) {
        if (!values.isEmpty()) {
            actualIndexes = new int[values.size()];
            int i = 0;
            MutableArray array = mutableParent(delegate);
            for (Object value : values) {
                int actualIndex = array.indexOf(value);
                array.remove(actualIndex);
                actualIndexes[i++] = actualIndex;
            }
        } else {
            actualIndexes = null;
        }
View Full Code Here

    }

    @Override
    public void rollback( MutableDocument delegate ) {
        if (actualIndex > -1) {
            MutableArray array = mutableParent(delegate);
            array.remove(actualIndex);
        }
    }
View Full Code Here

        }
    }

    @Override
    public void replay( MutableDocument delegate ) {
        MutableArray array = mutableParent(delegate);
        if (index == APPEND_INDEX) {
            actualIndex = array.addValue(value);
        } else {
            array.addValue(index, value);
            actualIndex = index;
        }
    }
View Full Code Here

    @Override
    public void rollback( MutableDocument delegate ) {
        if (removedEntries != null) {
            // Add into the same locations ...
            MutableArray array = mutableParent(delegate);
            for (Entry entry : removedEntries) {
                array.add(entry.getIndex(), entry.getValue());
            }
        }
    }
View Full Code Here

        return removedEntries;
    }

    @Override
    public void replay( MutableDocument delegate ) {
        MutableArray array = mutableParent(delegate);
        removedEntries = array.retainAllValues(values);
    }
View Full Code Here

    }

    @Override
    public void rollback( MutableDocument delegate ) {
        if (added) {
            MutableArray array = mutableParent(delegate);
            array.remove(this.index);
        }
    }
View Full Code Here

        }
    }

    @Override
    public void replay( MutableDocument delegate ) {
        MutableArray array = mutableParent(delegate);
        added = array.addValueIfAbsent(value);
    }
View Full Code Here

TOP

Related Classes of org.infinispan.schematic.internal.document.MutableArray

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.