Package org.sdnplatform.sync.internal.version

Examples of org.sdnplatform.sync.internal.version.VectorClock.incremented()


    @Override
    public IVersion put(K key, Versioned<V> versioned)
            throws SyncException {
        VectorClock vc = (VectorClock)versioned.getVersion();

        vc = vc.incremented(syncManager.getLocalNodeId(),
                            System.currentTimeMillis());
        versioned = Versioned.value(versioned.getValue(), vc);

        delegate.put(key, versioned);
        return versioned.getVersion();
View Full Code Here


                List<IVersion> versions = store.getVersions(key);
                VectorClock newclock = new VectorClock();
                for (IVersion v : versions) {
                    newclock = newclock.merge((VectorClock)v);
                }
                newclock = newclock.incremented(syncManager.getLocalNodeId(),
                                                System.currentTimeMillis());
                value = Versioned.value(rvalue, newclock);
            } else {
                throw new SyncException("No value specified for put");
            }
View Full Code Here

                for (IVersion v : versions) {
                    newclock = newclock.merge((VectorClock)v);
                }
            }
            newclock =
                    newclock.incremented(rpcService.syncManager.getLocalNodeId(),
                                         System.currentTimeMillis());
            Versioned<byte[]> value = Versioned.value(null, newclock);
            store.put(key, value);

            DeleteResponseMessage m = new DeleteResponseMessage();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.