Examples of pollChanges()


Examples of org.haystack.HWatch.pollChanges()

        // poll cov or refresh
        if (req.meta().has("refresh"))
            writeGrid(writer, watch.pollRefresh());
        else
            writeGrid(writer, watch.pollChanges());
    }
}

//////////////////////////////////////////////////////////////////////////
// PointWriteOp
View Full Code Here

Examples of org.haystack.HWatch.pollChanges()

        verifyEq(client.watches().length, 1);
        verify(client.watches()[0] == w);
        verifyEq(w.lease().millis(), 60000L);

        // poll for changes (should be none yet)
        HGrid poll = w.pollChanges();
        verifyEq(poll.numRows(), 0);

        // make change to b and d
        verifyEq(b.has("javaTest"), false);
        verifyEq(d.has("javaTest"), false);
View Full Code Here

Examples of org.haystack.HWatch.pollChanges()

        // make change to b and d
        verifyEq(b.has("javaTest"), false);
        verifyEq(d.has("javaTest"), false);
        client.eval("commit(diff(readById(@" + b.id().val + "), {javaTest:123}))");
        client.eval("commit(diff(readById(@" + d.id().val + "), {javaTest:456}))");
        poll = w.pollChanges();
        verifyEq(poll.numRows(), 2);
        HDict newb, newd;
        if (poll.row(0).id().equals(b.id())) {
            newb = poll.row(0);
            newd = poll.row(1);
View Full Code Here

Examples of org.haystack.HWatch.pollChanges()

        // remove d, and then poll changes
        w.unsub(new HRef[] { d.id() });
        client.eval("commit(diff(readById(@" + b.id().val + "), {-javaTest}))");
        client.eval("commit(diff(readById(@" + d.id().val + "), {-javaTest}))");
        poll = w.pollChanges();
        verifyEq(poll.numRows(), 1);
        verifyEq(poll.row(0).dis(), b.dis());
        verifyEq(poll.row(0).has("javaTest"), false);

        // remove a and c and poll refresh
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.