Package com.opengamma.engine.view.listener

Examples of com.opengamma.engine.view.listener.CycleFragmentCompletedCall


    send(new CycleStartedCall(cycleMetadata));
  }

  @Override
  public void cycleFragmentCompleted(ViewComputationResultModel fullFragment, ViewDeltaResultModel deltaFragment) {
    send(new CycleFragmentCompletedCall(fullFragment, deltaFragment));
  }
View Full Code Here


  public void assertCycleFragmentCompleted(long timeoutMillis) {
    assertCycleFragmentCompleted(timeoutMillis, null, null);
  }

  public void assertCycleFragmentCompleted(long timeoutMillis, ViewResultModel expectedFullResult, ViewDeltaResultModel expectedDeltaResult) {
    CycleFragmentCompletedCall call;
    try {
      call = getCycleFragmentCompleted(timeoutMillis);
    } catch (Exception e) {
      throw new AssertionError("Expected cycleFragmentCompleted call error: " + e.getMessage());
    }
    if (expectedFullResult != null) {
      assertEquals(expectedFullResult, call.getFullFragment());
    }
    if (expectedDeltaResult != null) {
      assertEquals(expectedDeltaResult, call.getDeltaFragment());
    }
  }
View Full Code Here

    callReceived(new ProcessCompletedCall());
  }

  @Override
  public void cycleFragmentCompleted(ViewComputationResultModel fullResult, ViewDeltaResultModel deltaResult) {
    callReceived(new CycleFragmentCompletedCall(fullResult, deltaResult), true);
  }
View Full Code Here

      if (isPassThrough()) {
        getUnderlying().cycleFragmentCompleted(fullFragment, deltaFragment);
      } else {
        if (_cycleFragmentCompletedIndex != -1) {
          // There's an old fragment completed call in the queue - find it and move to end
          CycleFragmentCompletedCall cycleFragmentCompletedCall = pullCallToEnd(_cycleFragmentCompletedIndex);
          // Merge new fragment completed call into old one
          cycleFragmentCompletedCall.update(fullFragment, deltaFragment);
        } else {
          // No existing fragment completed call - add new one
          CycleFragmentCompletedCall cycleFragmentCompletedCall = new CycleFragmentCompletedCall(fullFragment, deltaFragment);
          _cycleFragmentCompletedIndex = _callQueue.size();
          _callQueue.add(cycleFragmentCompletedCall);
        }
      }
      _lastUpdateMillis.set(System.currentTimeMillis());
View Full Code Here

  public CycleFragmentCompletedCall buildObject(FudgeDeserializer deserializer, FudgeMsg msg) {
    FudgeField fullResultField = msg.getByName(FULL_FRAGMENT_FIELD);
    ViewComputationResultModel fullResult = fullResultField != null ? deserializer.fieldValueToObject(ViewComputationResultModel.class, fullResultField) : null;
    FudgeField deltaResultField = msg.getByName(DELTA_FRAGMENT_FIELD);
    ViewDeltaResultModel deltaResult = deltaResultField != null ? deserializer.fieldValueToObject(ViewDeltaResultModel.class, deltaResultField) : null;
    return new CycleFragmentCompletedCall(fullResult, deltaResult);
  }
View Full Code Here

TOP

Related Classes of com.opengamma.engine.view.listener.CycleFragmentCompletedCall

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.