Package ch.ethz.vs.rowa

Examples of ch.ethz.vs.rowa.Middleware$Runner


public class TestMiddleware {

  public static void main(String[] args) throws MiddlewareException {
    String pass = "2JCGN6kheF";
    String user = "student33";
    Middleware mware = Middleware.getMiddleware(user, pass);
   
//    client 1
    UUID c1 = null;
    try {
      c1 = mware.startTransaction();
    } catch (MiddlewareException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
   
    UUID c2 = null;
    try {
      c2 = mware.startTransaction();
    } catch (MiddlewareException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
   
    mware.executeQuery(c1, null, "do some query");
    mware.executeQuery(c2, null, "do some query");
    mware.executeQuery(c2, null, "query 2");
    mware.executeQuery(c1, null, "query 2");
    mware.commitTransaction(c1);
   
   
   
   
    mware.commitTransaction(c2);
    //mware.shutdown();
   
  }
View Full Code Here


    String user = "student30";
    String pass = "hWhsVZETQE";
   
//    String pass = "2JCGN6kheF";
//    String user = "student33";
    Middleware middleware = Middleware.getMiddleware(user, pass);
    BenchmarkFrame frame = new BenchmarkFrame(middleware);
    frame.setVisible(true);
  }
View Full Code Here

        try { throw new Exception(); } catch(Exception ex) { name = ex.getStackTrace()[1].getMethodName(); }
        Method[] methods = getClass().getDeclaredMethods();
        Method m=null;
        for(int i=0; i<methods.length; i++) if (methods[i].getName().equals(name)) { m=methods[i]; break; }
        final Method method=m;
        return new Runner() {
            private static final long serialVersionUID = 0;
            public void run() {
                try {
                    method.setAccessible(true);
                    method.invoke(SimpleGUI.this, new Object[]{});
View Full Code Here

        try { throw new Exception(); } catch(Exception ex) { name = ex.getStackTrace()[1].getMethodName(); }
        Method[] methods = getClass().getDeclaredMethods();
        Method m=null;
        for(int i=0; i<methods.length; i++) if (methods[i].getName().equals(name)) { m=methods[i]; break; }
        final Method method=m;
        return new Runner() {
            private static final long serialVersionUID = 0;
            public void run(Object arg) {
                try {
                    method.setAccessible(true);
                    method.invoke(SimpleGUI.this, new Object[]{arg});
View Full Code Here

      try { throw new Exception(); } catch(Exception ex) { name = ex.getStackTrace()[1].getMethodName(); }
      Method[] methods = getClass().getDeclaredMethods();
      Method m=null;
      for(int i=0; i<methods.length; i++) if (methods[i].getName().equals(name)) { m=methods[i]; break; }
      final Method method=m;
      return new Runner() {
         private static final long serialVersionUID = 0;
         public void run() {
            try {
               method.setAccessible(true);
               method.invoke(VizGUI.this, new Object[]{});
View Full Code Here

      try { throw new Exception(); } catch(Exception ex) { name = ex.getStackTrace()[1].getMethodName(); }
      Method[] methods = getClass().getDeclaredMethods();
      Method m=null;
      for(int i=0; i<methods.length; i++) if (methods[i].getName().equals(name)) { m=methods[i]; break; }
      final Method method=m;
      return new Runner() {
         private static final long serialVersionUID = 0;
         public void run(Object arg) {
            try {
               method.setAccessible(true);
               method.invoke(VizGUI.this, new Object[]{arg});
View Full Code Here

TOP

Related Classes of ch.ethz.vs.rowa.Middleware$Runner

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.