コード例 #1
0
  public void doSomethingElseUsingServiceB(int noOfCallsToServiceB) {
    ServiceB serviceB = new ServiceB("config");

    for (int i = 0; i < noOfCallsToServiceB; i++) {
      serviceB.computeX(i, 1);
    }

    config = serviceB.getConfig();
  }
コード例 #2
0
  public String performComplexOperation(List<?> items) {
    ServiceB serviceB = new ServiceB(config);
    int i = 1;

    for (Object item : items) {
      serviceB.computeX(i, item.hashCode());
    }

    return serviceB.findItem("ABC", "xyz", "01");
  }