Examples of updateLease()


Examples of org.jboss.remoting.Lease.updateLease()

      Thread.currentThread().sleep(3000);

      assertFalse(notifier.notificationFired);

      System.out.println("test - update lease");
      lease.updateLease(5000);

      System.out.println("test - sleeping 5 seconds");
      Thread.currentThread().sleep(5000);

      assertFalse(notifier.notificationFired);
View Full Code Here

Examples of org.jboss.remoting.Lease.updateLease()

      Thread.currentThread().sleep(5000);

      assertFalse(notifier.notificationFired);

      System.out.println("test - update lease");
      lease.updateLease(5000);

      System.out.println("test - sleeping 10 seconds");
      Thread.currentThread().sleep(10000);

      assertFalse(notifier.notificationFired);
View Full Code Here

Examples of org.jboss.remoting.Lease.updateLease()

      Thread.currentThread().sleep(10000);

      assertFalse(notifier.notificationFired);

      System.out.println("test - update lease");
      lease.updateLease(5000);

      System.out.println("test - sleeping 60 seconds");
      Thread.currentThread().sleep(60000);

      assertTrue(notifier.notificationFired);
View Full Code Here

Examples of org.jboss.remoting.Lease.updateLease()

      assertFalse(notifier2.notificationFired);
      assertFalse(notifier3.notificationFired);

      lease1.updateLease(3000);
      lease2.updateLease(5000);
      lease3.updateLease(10000);

      // having to so 5 second sleep again, because lease window
      // not activated until after the first update is made
      System.out.println("waiting 5 seconds before update.");
      Thread.currentThread().sleep(5000);
View Full Code Here

Examples of org.jboss.remoting.Lease.updateLease()

      assertFalse(notifier2.notificationFired);
      assertFalse(notifier3.notificationFired);

      lease1.updateLease(3000);
      lease2.updateLease(5000);
      lease3.updateLease(10000);


      // now initial delay is gone (since update with the same delay times),
      // however, the lease window is bigger (should be 10 seconds) since took so long to update,
      // therefore, should be able to wait 8 seconds now without firing
View Full Code Here

Examples of org.jboss.remoting.Lease.updateLease()

      assertFalse(notifier3.notificationFired);

      // will let lease1 timeout, but update lease 2 & 3 to new times
      // which should reset the delay window to new value of 6 seconds
      lease2.updateLease(3000);
      lease3.updateLease(3000);

      // will be waiting 2 seconds and then updating lease 2 & 3
      // several times as we don't want to change the lease window
      // for them, but have to allow lease 1 to timeout (and since it's
      // lease window is now 10 and requires two internal timeouts on the
View Full Code Here

Examples of org.jboss.remoting.Lease.updateLease()

      System.out.println("waiting 2 seconds before update");
      Thread.currentThread().sleep(2000);

      // note, should *not* change the lease window
      lease2.updateLease(3000);
      lease3.updateLease(3000);

      System.out.println("waiting 2 seconds before update");
      Thread.currentThread().sleep(2000);

      // note, should *not* change the lease window
View Full Code Here

Examples of org.jboss.remoting.Lease.updateLease()

      System.out.println("waiting 2 seconds before update");
      Thread.currentThread().sleep(2000);

      // note, should *not* change the lease window
      lease2.updateLease(3000);
      lease3.updateLease(3000);

      System.out.println("waiting 2 seconds before update");
      Thread.currentThread().sleep(2000);

      // note, should *not* change the lease window
View Full Code Here

Examples of org.jboss.remoting.Lease.updateLease()

      System.out.println("waiting 2 seconds before update");
      Thread.currentThread().sleep(2000);

      // note, should *not* change the lease window
      lease2.updateLease(3000);
      lease3.updateLease(3000);

      System.out.println("waiting 2 seconds before update");
      Thread.currentThread().sleep(2000);

      // note, should *not* change the lease window
View Full Code Here

Examples of org.jboss.remoting.Lease.updateLease()

      System.out.println("waiting 2 seconds before update");
      Thread.currentThread().sleep(2000);

      // note, should *not* change the lease window
      lease2.updateLease(3000);
      lease3.updateLease(3000);

      System.out.println("waiting 2 seconds before update");
      Thread.currentThread().sleep(2000);

      // note, should *not* change the lease window
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.