Examples of EditableDocument


Examples of org.infinispan.schematic.document.EditableDocument

                try {
                    latch.await(); // synchronize ...
                    tm().begin();
                    print("Began txn1");
                    db.lock(key);
                    EditableDocument editor = db.editContent(key, true);
                    editor.setNumber("k2", 3); // update an existing field
                    print(editor);
                    print("Committing txn1");
                    tm().commit();
                } catch (Exception e) {
                    log.error("Unexpected error performing transaction", e);
                }
            }
        }, false);
        Thread t2 = fork(new Runnable() {
            @SuppressWarnings( "synthetic-access" )
            @Override
            public void run() {
                try {
                    latch.await(); // synchronize ...
                    tm().begin();
                    print("Began txn2");
                    db.lock(key);
                    EditableDocument editor = db.editContent(key, true);
                    editor.setNumber("k3", 3); // add a new field
                    print(editor);
                    print("Committing txn2");
                    tm().commit();
                } catch (Exception e) {
                    log.error("Unexpected error performing transaction", e);
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.