Examples of waitOne()


Examples of com.bj58.spat.gaea.client.utility.AutoResetEvent.waitOne()

        if (wd == null) {
            throw new Exception("Need invoke 'registerRec' method before invoke 'receive' method!");
        }
        AutoResetEvent event = wd.getEvent();
        int timeout = getReadTimeout(socketConfig.getReceiveTimeout(), queueLen);
        if (!event.waitOne(timeout)) {
            throw new TimeoutException("Receive data timeout or error!timeout:" + timeout + "ms,queue length:" + queueLen);
        }
        byte[] data = wd.getData();
        int offset = SFPStruct.Version;
        int len = ByteConverter.bytesToIntLittleEndian(data, offset);
View Full Code Here

Examples of com.bj58.spat.gaea.client.utility.AutoResetEvent.waitOne()

        System.out.println("send set signal!");
      }
    });
    th.run();
    System.out.println("start wait!");
    event.waitOne(10000);
    System.out.println("end wait!");
  }

  @Test
  public void testWaitOne() throws Exception {
View Full Code Here

Examples of com.bj58.spat.gaea.client.utility.AutoResetEvent.waitOne()

  public void testWaitOne() throws Exception {
    final AutoResetEvent event = new AutoResetEvent();
    event.set();
    event.set();
    System.out.println("stime:" + System.currentTimeMillis());
    event.waitOne(10000);
    event.waitOne(10000);
    event.waitOne(10000);
    event.waitOne(10000);
    System.out.println("time:" + System.currentTimeMillis());
  }
View Full Code Here

Examples of com.bj58.spat.gaea.client.utility.AutoResetEvent.waitOne()

    final AutoResetEvent event = new AutoResetEvent();
    event.set();
    event.set();
    System.out.println("stime:" + System.currentTimeMillis());
    event.waitOne(10000);
    event.waitOne(10000);
    event.waitOne(10000);
    event.waitOne(10000);
    System.out.println("time:" + System.currentTimeMillis());
  }
}
View Full Code Here

Examples of com.bj58.spat.gaea.client.utility.AutoResetEvent.waitOne()

    event.set();
    event.set();
    System.out.println("stime:" + System.currentTimeMillis());
    event.waitOne(10000);
    event.waitOne(10000);
    event.waitOne(10000);
    event.waitOne(10000);
    System.out.println("time:" + System.currentTimeMillis());
  }
}
View Full Code Here

Examples of com.bj58.spat.gaea.client.utility.AutoResetEvent.waitOne()

    event.set();
    System.out.println("stime:" + System.currentTimeMillis());
    event.waitOne(10000);
    event.waitOne(10000);
    event.waitOne(10000);
    event.waitOne(10000);
    System.out.println("time:" + System.currentTimeMillis());
  }
}
View Full Code Here

Examples of com.bj58.spat.gaea.client.utility.AutoResetEvent.waitOne()

        System.out.println("send set signal!");
      }
    });
    th.run();
    System.out.println("start wait!");
    event.waitOne(10000);
    System.out.println("end wait!");
  }

  @Test
  public void testWaitOne() throws Exception {
View Full Code Here

Examples of com.bj58.spat.gaea.client.utility.AutoResetEvent.waitOne()

  public void testWaitOne() throws Exception {
    final AutoResetEvent event = new AutoResetEvent();
    event.set();
    event.set();
    System.out.println("stime:" + System.currentTimeMillis());
    event.waitOne(10000);
    event.waitOne(10000);
    event.waitOne(10000);
    event.waitOne(10000);
    System.out.println("time:" + System.currentTimeMillis());
  }
View Full Code Here

Examples of com.bj58.spat.gaea.client.utility.AutoResetEvent.waitOne()

    final AutoResetEvent event = new AutoResetEvent();
    event.set();
    event.set();
    System.out.println("stime:" + System.currentTimeMillis());
    event.waitOne(10000);
    event.waitOne(10000);
    event.waitOne(10000);
    event.waitOne(10000);
    System.out.println("time:" + System.currentTimeMillis());
  }
}
View Full Code Here

Examples of com.bj58.spat.gaea.client.utility.AutoResetEvent.waitOne()

    event.set();
    event.set();
    System.out.println("stime:" + System.currentTimeMillis());
    event.waitOne(10000);
    event.waitOne(10000);
    event.waitOne(10000);
    event.waitOne(10000);
    System.out.println("time:" + System.currentTimeMillis());
  }
}
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.