コード例 #1
0
    public static void visitL1DSOConfig(ConfigVisitor visitor, DSOClientConfigHelper config) {
      String testClassName = App.class.getName();
      TransparencyClassSpec spec = config.getOrCreateSpec(testClassName);
      spec.addRoot("clearables", "clearables");
      String methodExpression = "* " + testClassName + "*.*(..)";
      config.addWriteAutolock(methodExpression);

      config.addIncludePattern(Key.class.getName());
      config.addIncludePattern(Value.class.getName());
    }
コード例 #2
0
  public static void visitL1DSOConfig(ConfigVisitor visitor, DSOClientConfigHelper config) {

    TransparencyClassSpec thisSpec =
        config.getOrCreateSpec(FastReadSlowWriteTestApp.class.getName());
    thisSpec.addRoot("idGenerator", "idGenerator");
    new SynchronizedIntSpec().visit(visitor, config);

    TransparencyClassSpec readerSpec = config.getOrCreateSpec("com.tctest.TestReader");
    TransparencyClassSpec writerSpec = config.getOrCreateSpec("com.tctest.TestWriter");

    readerSpec.addRoot("stuff", "rootBabyRoot");
    writerSpec.addRoot("stuff", "rootBabyRoot");
    config.addReadAutolock("* com.tctest.TestReader.*(..)");
    config.addWriteAutolock("* com.tctest.TestWriter.*(..)");
  }
コード例 #3
0
    public static void visitL1DSOConfig(ConfigVisitor visitor, DSOClientConfigHelper config) {
      new CyclicBarrierSpec().visit(visitor, config);

      String testClass;
      TransparencyClassSpec spec;
      String methodExpression;

      testClass = Ref.class.getName();
      spec = config.getOrCreateSpec(testClass);

      testClass = NewObjectCreationRaceTest.class.getName();
      spec = config.getOrCreateSpec(testClass);
      methodExpression = "* " + testClass + "*.*(..)";
      config.addWriteAutolock(methodExpression);

      config.addIncludePattern(testClass + "$*");

      testClass = NewObjectCreationRaceTestApp.class.getName();
      spec = config.getOrCreateSpec(testClass);

      methodExpression = "* " + testClass + "*.*(..)";
      config.addWriteAutolock(methodExpression);
      spec.addRoot("barrier", "barrier");
      spec.addRoot("root", "root");
    }
コード例 #4
0
  public static void visitL1DSOConfig(ConfigVisitor visitor, DSOClientConfigHelper cfg) {
    String appClassName = DSOServerRestartTestApp.class.getName();
    cfg.addIncludePattern(appClassName);
    cfg.addRoot(
        new Root(
            appClassName,
            "distributedSharedLockHolder",
            appClassName + ".distributedSharedLockHolder"),
        true);
    cfg.addWriteAutolock("void " + appClassName + ".setDistributedSharedLock(java.lang.Object)");
    cfg.addReadAutolock("java.lang.Object " + appClassName + ".getSharedLock()");

    cfg.addWriteAutolock("void " + appClassName + ".basicDoWait(..)");
    cfg.addWriteAutolock("void " + appClassName + ".doNotify()");
    cfg.addWriteAutolock("void " + appClassName + ".doNotifyAll()");
    LockDefinition lockDefinition = new LockDefinition("basicAttemptLock", ConfigLockLevel.WRITE);
    lockDefinition.commit();
    cfg.addLock("void " + appClassName + ".basicAttemptLock()", lockDefinition);

    lockDefinition = new LockDefinition("blockShutdown", ConfigLockLevel.WRITE);
    lockDefinition.commit();
    cfg.addLock("void " + appClassName + ".syncBlockShutdown(..)", lockDefinition);
  }