Package ca.uwaterloo.fydp.ossp.impl

Examples of ca.uwaterloo.fydp.ossp.impl.OSSPSimpleSynchronizer


      runningClients[0] = 0;
      final Object runningClientsSync = new Object();

      // We make all clients share the same synchronizer, simply so that
      // the text on standard out won't be garbled.
      final OSSPSynchronizer sync = new OSSPSimpleSynchronizer();
      for (int i = 0; i < numberOfClients; i++) {
        final OSSPLink client = OSSPImpl.getInstance().makeTCPLink(addr, port, sync);
        client.setReceiver(new OSSPHalfLink() {
          private java.util.Random rnd = new java.util.Random();
          private XCDERootDirectory localState = null;
View Full Code Here


    this.XCDEaddr = serverAddr;
    this.XCDEport = serverPort;
    // we need a synchronization object so that all our changes are atomic.
    // we will use the same sync object for all changes to ensure stability
    // and atomicity
    sync = new OSSPSimpleSynchronizer();

    // we have to load the com.mysql.jdbc.Driver class so that when we go to
    // make an SQL
    // connection we are able to find the specific driver that we need
    try
View Full Code Here

   * @param repeats
   */
  public static void stressTest(InetAddress addr, int port, final int numberOfClients, final long timeInMillis, int repeats, boolean noDelayMode) {
    for (int trial = 0; trial < repeats; trial++) {

      final OSSPSynchronizer sync = new OSSPSimpleSynchronizer();
      // List of all objects opened by the clients.
      for (int i = 0; i < numberOfClients; i++) {
        final LinkedList objs = new LinkedList();
        final XCDEDirClient root;
        if (!noDelayMode) {
View Full Code Here

TOP

Related Classes of ca.uwaterloo.fydp.ossp.impl.OSSPSimpleSynchronizer

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.