Package org.axonframework.commandhandling.distributed

Examples of org.axonframework.commandhandling.distributed.ConsistentHash


        assertTrue("Connector 2 failed to connect", connector2.awaitJoined());

        // wait for both connectors to have the same view
        waitForConnectorSync();

        ConsistentHash hashBefore = connector1.getConsistentHash();
        // secretly insert an illegal message
        channel1.getReceiver().receive(new Message(channel1.getAddress(), new IpAddress(12345),
                                  new JoinMessage(10, Collections.<String>emptySet())));
        ConsistentHash hash2After = connector1.getConsistentHash();
        assertEquals("That message should not have changed the ring", hashBefore, hash2After);
    }
View Full Code Here


            consistentHash = (ConsistentHash) Util.objectFromStream(new DataInputStream(istream));
        }

        @Override
        public void viewAccepted(View view) {
            ConsistentHash newHash = consistentHash.withExclusively(getMemberNames(view));
            if (!consistentHash.equals(newHash)) {
                int messagesLost = 0;
                // check whether the members with outstanding callbacks are all alive
                for (Map.Entry<String, MemberAwareCommandCallback> entry : callbacks.entrySet()) {
                    if (!entry.getValue().isMemberLive(view)) {
View Full Code Here

TOP

Related Classes of org.axonframework.commandhandling.distributed.ConsistentHash

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.