Package com.hp.mwtests.ts.txoj.common.resources

Examples of com.hp.mwtests.ts.txoj.common.resources.RecoverableObject


  System.out.println(totalTime+" milliseconds");
    }

public static long recoverableTest (long iters)
    {
  RecoverableObject foo = new RecoverableObject();
  AtomicAction A = null;
  long t1 = System.currentTimeMillis();

  for (int c = 0; c < iters; c++)
  {
      A = new AtomicAction();
     
      A.begin();
     
      foo.set(2);

      A.commit();

      A = null;
  }
View Full Code Here


  System.out.println(totalTime+" milliseconds");
    }

public static long recoverableTest (long iters)
    {
  RecoverableObject foo = new RecoverableObject();
  AtomicAction A = null;
  long t1 = System.currentTimeMillis();

  for (int c = 0; c < iters; c++)
  {
      A = new AtomicAction();
     
      A.begin();
     
      foo.set(2);

      A.commit();

      A = null;
  }
View Full Code Here

        }
    }

public static long recoverableTest (long iters)
    {
  RecoverableObject foo = new RecoverableObject();
  AtomicAction A = new AtomicAction();
  long t1 = System.currentTimeMillis();

  A.begin();

  for (int c = 0; c < iters; c++)
  {
      foo.set(2);
  }

  A.commit();

  return System.currentTimeMillis() - t1;
View Full Code Here

{

public void run(String[] args)
    {
  boolean passed = false;
  RecoverableObject foo = new RecoverableObject();
  int value = 0;

  AtomicAction A = new AtomicAction();

  A.begin();

  logInformation("value is "+foo.get());

  foo.set(2);

  logInformation("value is "+foo.get());

  A.abort();

  value = foo.get();

  logInformation("value is now "+value);

  if (value == 0)
  {
      AtomicAction B = new AtomicAction();

      B.begin();

      logInformation("value is "+foo.get());

      foo.set(4);

      logInformation("value is "+foo.get());

      B.commit();

      value = foo.get();

      logInformation("value is now "+value);

      if (value == 4)
    passed = true;
View Full Code Here

{
   
public void run(String[] args)
    {
  boolean passed = false;
  RecoverableObject foo = new RecoverableObject();
  int value = 0;

  AtomicAction A = new AtomicAction();

  A.begin();
 
  logInformation("value is "+foo.get());

  foo.set(2);

  logInformation("value is "+foo.get());

  A.abort();

  value = foo.get();

  logInformation("value is now "+value);

  if (value == 0)
  {
      AtomicAction B = new AtomicAction();
 
      B.begin();
 
      logInformation("value is "+foo.get());

      foo.set(4);

      logInformation("value is "+foo.get());

      B.commit();

      value = foo.get();

      logInformation("value is now "+value);

      if (value == 4)
    passed = true;
View Full Code Here

        }
    }

public static long recoverableTest (long iters)
    {
  RecoverableObject foo = new RecoverableObject();
  AtomicAction A = new AtomicAction();
  long t1 = System.currentTimeMillis();

  A.begin();
 
  for (int c = 0; c < iters; c++)
  {
      foo.set(2);
  }

  A.commit()

  return System.currentTimeMillis() - t1;
View Full Code Here

TOP

Related Classes of com.hp.mwtests.ts.txoj.common.resources.RecoverableObject

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.