Package co.paralleluniverse.galaxy.cluster.DistributedTree

Examples of co.paralleluniverse.galaxy.cluster.DistributedTree.Listener


            throw new IllegalArgumentException("Branch root must start with a '/', but is " + branchRoot);
        this.tree = tree;
        this.branchRoot = branchRoot;
        this.ordered = ordered;

        tree.addListener(branchRoot, new Listener() {
            @Override
            public void nodeChildAdded(String node, String childName) {
                assert node.equals(branchRoot);
                DistributedBranchHelper.this.nodeAdded(childName);
            }
View Full Code Here


        final String parentPath = join(pathElements, pathElements.length - 1);
        final String child = pathElements[pathElements.length - 1];

        addToList(parentPath, child);

        final Listener listener = getListener(parentPath);
        if (listener != null)
            listener.nodeChildAdded(parentPath, child);
    }
View Full Code Here

        final String parentPath = join(pathElements, pathElements.length - 1);
        final String child = pathElements[pathElements.length - 1];

        removeFromList(parentPath, child);

        final Listener listener = getListener(parentPath);
        if (listener != null)
            listener.nodeChildDeleted(parentPath, child);
    }
View Full Code Here

        final String child = args[args.length - 2];
        final String value = args[args.length - 1];

        setValue(parentPath + '/' + child, value);

        final Listener listener = getListener(parentPath);
        if (listener != null)
            listener.nodeChildUpdated(parentPath, child);
    }
View Full Code Here

    static String deserialize(byte[] array) {
        return new String(array, Charsets.UTF_8);
    }
   
    private void addListener(final String node) {
        tree.addListener(node, new Listener() {

            @Override
            public void nodeAdded(String node) {
                event("ADDED", node);
            }
View Full Code Here

            throw new IllegalArgumentException("Branch root must start with a '/', but is " + branchRoot);
        this.tree = tree;
        this.branchRoot = branchRoot;
        this.ordered = ordered;

        tree.addListener(branchRoot, new Listener() {
            @Override
            public void nodeChildAdded(String node, String childName) {
                assert node.equals(branchRoot);
                DistributedBranchHelper.this.nodeAdded(childName);
            }
View Full Code Here

            throw new IllegalArgumentException("Branch root must start with a '/', but is " + branchRoot);
        this.tree = tree;
        this.branchRoot = branchRoot;
        this.ordered = ordered;

        tree.addListener(branchRoot, new Listener() {
            @Override
            public void nodeChildAdded(String node, String childName) {
                assert node.equals(branchRoot);
                DistributedBranchHelper.this.nodeAdded(childName);
            }
View Full Code Here

TOP

Related Classes of co.paralleluniverse.galaxy.cluster.DistributedTree.Listener

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.