Package akka.persistence

Examples of akka.persistence.SnapshotOffer


        public void onReceive(Object message) throws Exception {
            if (isPersistent()) {
                numReplicated += 1;
                System.out.println(String.format("view received %s (num replicated = %d)", message, numReplicated));
            } else if (message instanceof SnapshotOffer) {
                SnapshotOffer so = (SnapshotOffer)message;
                numReplicated = (Integer)so.snapshot();
                System.out.println(String.format("view received snapshot offer %s (metadata = %s)", numReplicated, so.metadata()));
            } else if (message.equals("snap")) {
                saveSnapshot(numReplicated);
            } else {
              unhandled(message);
            }
View Full Code Here

TOP

Related Classes of akka.persistence.SnapshotOffer

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.