Class Docheck

java.lang.Object
io.odysz.semantic.syn.Docheck

public class Docheck extends Object
Checker of each Synode.
Author:
Ody
  • Field Details

  • Constructor Details

  • Method Details

    • docs

      public int docs() throws SQLException, io.odysz.transact.x.TransException
      Count docm's table records.
      Throws:
      SQLException
      io.odysz.transact.x.TransException
    • devs

      public int devs() throws SQLException, io.odysz.transact.x.TransException
      Count devm's table records.
      Throws:
      SQLException
      io.odysz.transact.x.TransException
    • doclist

      public String doclist(SyntityMeta entm) throws SQLException, io.odysz.transact.x.TransException
      Throws:
      SQLException
      io.odysz.transact.x.TransException
    • synodes

      public void synodes(int... nx) throws io.odysz.transact.x.TransException, SQLException
      Verify all synodes information here are as expected.
      Parameters:
      nx - ck index
      Throws:
      io.odysz.transact.x.TransException
      SQLException
    • doc

      public void doc(int count, String... synids) throws io.odysz.transact.x.TransException, SQLException
      Check doc count.
      Parameters:
      count -
      synids -
      Throws:
      io.odysz.transact.x.TransException
      SQLException
    • buf_change

      public long buf_change(int count, String crud, String eid, SyntityMeta entm) throws io.odysz.transact.x.TransException, SQLException
      Verify change flag, crud, where tabl = entm.tbl, entity-id = eid.
      Parameters:
      count -
      crud - flag to be verified
      eid - entity id
      entm - entity table meta
      Returns:
      nyquence.n
      Throws:
      io.odysz.transact.x.TransException
      SQLException
    • buf_change_p

      public long buf_change_p(int count, String crud, String eid) throws io.odysz.transact.x.TransException, SQLException
      Throws:
      io.odysz.transact.x.TransException
      SQLException
    • change_doclog

      public long change_doclog(int count, String crud, String eid) throws io.odysz.transact.x.TransException, SQLException
      Throws:
      io.odysz.transact.x.TransException
      SQLException
    • change_doclog

      public long change_doclog(int count, String crud, String synoder, String eid) throws io.odysz.transact.x.TransException, SQLException
      Throws:
      io.odysz.transact.x.TransException
      SQLException
    • change_log

      public long change_log(int count, String crud, String synoder, String eid, SyntityMeta entm) throws io.odysz.transact.x.TransException, SQLException
      Throws:
      io.odysz.transact.x.TransException
      SQLException
    • change_log_uids

      public long change_log_uids(int count, String crud, String synoder, String uids, SyntityMeta entm) throws io.odysz.transact.x.TransException, SQLException
      Throws:
      io.odysz.transact.x.TransException
      SQLException
    • buf_change

      public long buf_change(int count, String crud, String synoder, String eid, SyntityMeta entm) throws io.odysz.transact.x.TransException, SQLException
      Throws:
      io.odysz.transact.x.TransException
      SQLException
    • changelog

      public long changelog(int count, String crud, String eid, SyntityMeta entm) throws io.odysz.transact.x.TransException, SQLException
      Throws:
      io.odysz.transact.x.TransException
      SQLException
    • changelog

      public long changelog(int count, String crud, String synoder, String eid, SyntityMeta entm) throws io.odysz.transact.x.TransException, SQLException
      Throws:
      io.odysz.transact.x.TransException
      SQLException
    • psubs

      public void psubs(int subcount, String chgid, int... sub) throws SQLException, io.odysz.transact.x.TransException
      verify h_photos' subscription.
      Parameters:
      chgid -
      sub - subscriptions for X/Y/Z/W, -1 if not exists
      Throws:
      SQLException
      io.odysz.transact.x.TransException
    • synsubs

      public void synsubs(int subcount, String uids, int... sub) throws SQLException, io.odysz.transact.x.TransException
      Throws:
      SQLException
      io.odysz.transact.x.TransException
    • subsCount

      public void subsCount(SyntityMeta entm, int subcount, String chgId, String... toIds) throws SQLException, io.odysz.transact.x.TransException
      Throws:
      SQLException
      io.odysz.transact.x.TransException
    • verifile

      public void verifile(String synoder, String clientpath, ExpDocTableMeta docm)
      Verify if and only if one instance exists on this node.
      Parameters:
      synoder -
      clientpath -
    • printNyquv

      public static HashMap<String,Nyquence>[] printNyquv(Docheck[] ck, boolean... printSynode) throws SQLException, io.odysz.transact.x.TransException
      Throws:
      SQLException
      io.odysz.transact.x.TransException
    • printChangeLines

      public static void printChangeLines(Docheck[] ck) throws io.odysz.transact.x.TransException, SQLException
      Throws:
      io.odysz.transact.x.TransException
      SQLException
    • assertnv

      public static void assertnv(long... nvs)
      Assert ai = bi, where ai, bi in nvs [a0, a1, ..., b0, b1, ...].
      Parameters:
      nvs -
    • assertI

      public static void assertI(Docheck[] ck, HashMap<?,?>[] nvs) throws SQLException, io.odysz.transact.x.TransException
      Throws:
      SQLException
      io.odysz.transact.x.TransException
    • n0

      public Nyquence n0() throws SQLException, io.odysz.transact.x.TransException
      Throws:
      SQLException
      io.odysz.transact.x.TransException
    • assertnv

      public static void assertnv(HashMap<String,Nyquence> nv0, HashMap<String,Nyquence> nv1, int... delta)
    • stamp

      public long stamp() throws SQLException, io.odysz.transact.x.TransException
      Throws:
      SQLException
      io.odysz.transact.x.TransException
    • pushDebug

      public static void pushDebug() throws Exception

      Push connection's debug flags and return a checker instance.

      Example:
      pushDebug()
       .assertl(
        expect1, loadNyquvect(actual1), // logging suppressed
        expect2, loadNyquvect(actual2), // logging suppressed
        ...)
       .popDebug();                     // logging restored
      Throws:
      Exception
    • assertl

      public Docheck assertl(long... n)
    • popDebug

      public void popDebug()