Package org.serviceconnector.api

Examples of org.serviceconnector.api.SCSubscribeMessage


    request.setData("cache10MBStringFor1Hour_managedData");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: start cache guardian - publish 1 small initial 3 large Appendix (2 parts each)
    SCSubscribeMessage subMsg = new SCSubscribeMessage();
    subMsg.setMask(TestConstants.mask);
    subMsg.setSessionInfo(TestConstants.publish1Initial3LargeAppendixMsgCmd);
    subMsg.setData("700");
    guardianClient.startCacheGuardian(TestConstants.cacheGuardian1, subMsg, cacheGuardianCbk);

    // 4: verify callback retrieval - 1 initial within 10sec
    cacheGuardianCbk.waitForMessage(1, 10);
View Full Code Here


   * Expectation: passes
   */
  @Test
  public void t19_cc_PublishInitialsLoad10MBInitialNotPossible() throws Exception {
    // 1: start cache guardian - publish Initials (10000 with 1sec delay, cid=700)
    SCSubscribeMessage subMsg = new SCSubscribeMessage();
    subMsg.setMask(TestConstants.mask);
    subMsg.setSessionInfo(TestConstants.publishMsgWithDelayCmd);
    subMsg.setData("10000|100|700|" + SC_CACHING_METHOD.INITIAL.getValue());
    guardianClient.startCacheGuardian(TestConstants.cacheGuardian1, subMsg, cacheGuardianCbk);

    // 2: load large data (10MB) to cache (cid=700)
    SCMessage request = new SCMessage();
    request.setCacheId("700");
View Full Code Here

    request.setData("cacheFor1Hour_managedData");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: start cache guardian - publish 3 Appendix
    SCSubscribeMessage subMsg = new SCSubscribeMessage();
    subMsg.setMask(TestConstants.mask);
    subMsg.setSessionInfo(TestConstants.publish3AppendixMsgCmd);
    subMsg.setData("700");
    guardianClient.startCacheGuardian(TestConstants.cacheGuardian1, subMsg, cacheGuardianCbk);

    // 3: verify callback retrieval - 3 appendix within 10sec
    cacheGuardianCbk.waitForAppendMessage(3, 10);
View Full Code Here

    request.setData("cache10MBStringFor1Hour_managedData");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: start cache guardian - publish 3 Appendix
    SCSubscribeMessage subMsg = new SCSubscribeMessage();
    subMsg.setMask(TestConstants.mask);
    subMsg.setSessionInfo(TestConstants.publish3AppendixMsgCmd);
    subMsg.setData("700");
    guardianClient.startCacheGuardian(TestConstants.cacheGuardian1, subMsg, cacheGuardianCbk);

    // 3: verify callback retrieval - 3 appendix within 10sec
    cacheGuardianCbk.waitForAppendMessage(3, 10);
View Full Code Here

    request.setData("cache10MBStringFor1Hour_managedData");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: start cache guardian - publish 3 large Appendix (2 parts each)
    SCSubscribeMessage subMsg = new SCSubscribeMessage();
    subMsg.setMask(TestConstants.mask);
    subMsg.setSessionInfo(TestConstants.publish3LargeAppendixMsgCmd);
    subMsg.setData("700");
    guardianClient.startCacheGuardian(TestConstants.cacheGuardian1, subMsg, cacheGuardianCbk);

    // 3: verify callback retrieval - 3 appendix within 10sec
    cacheGuardianCbk.waitForAppendMessage(3, 10);
View Full Code Here

    request.setData("cache10MBStringFor1Hour_managedData");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: start cache guardian - publish 1 large (10MB) Appendix
    SCSubscribeMessage subMsg = new SCSubscribeMessage();
    subMsg.setMask(TestConstants.mask);
    subMsg.setSessionInfo(TestConstants.publish10MBAppendixMsgCmd);
    subMsg.setData("700");
    guardianClient.startCacheGuardian(TestConstants.cacheGuardian1, subMsg, cacheGuardianCbk);

    // 3: verify callback retrieval - 1 appendix within 100sec
    cacheGuardianCbk.waitForAppendMessage(1, 100);
View Full Code Here

    request.setCacheId("700");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: start cache guardian - doing nothing
    SCSubscribeMessage subMsg = new SCSubscribeMessage();
    subMsg.setMask(TestConstants.mask);
    subMsg.setData("700");
    guardianClient.startCacheGuardian(TestConstants.cacheGuardian1, subMsg, cacheGuardianCbk);

    // 3: stop cache guardian - cache will clean up managed data
    guardianClient.stopCacheGuardian();
View Full Code Here

    request.setCacheId("700");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: start cache guardian - publish 3 large Appendix (2 parts each)
    SCSubscribeMessage subMsg = new SCSubscribeMessage();
    subMsg.setMask(TestConstants.mask);
    subMsg.setSessionInfo(TestConstants.publish3LargeAppendixMsgCmd);
    subMsg.setData("700");
    guardianClient.startCacheGuardian(TestConstants.cacheGuardian1, subMsg, cacheGuardianCbk);

    // 3: stop cache guardian - cache will clean up managed data
    guardianClient.stopCacheGuardian();
View Full Code Here

   * Expectation: passes
   */
  @Test
  public void t26_cc_RetrievingAppendixDuringLoadOfInitialMsg() throws Exception {
    // 1: start cache guardian - publish Appendix (10000 with 1sec delay, cid=700)
    SCSubscribeMessage subMsg = new SCSubscribeMessage();
    subMsg.setMask(TestConstants.mask);
    subMsg.setSessionInfo(TestConstants.publishMsgWithDelayCmd);
    subMsg.setData("10000|100|700|" + SC_CACHING_METHOD.APPEND.getValue());
    guardianClient.startCacheGuardian(TestConstants.cacheGuardian1, subMsg, cacheGuardianCbk);

    // 2: load 10MB to cache (cid=700) - no caching possible because appendix are retrieved
    SCMessage request = new SCMessage();
    request.setCacheId("700");
View Full Code Here

    // 2: verify data is in top level cache
    Map<String, String> inspectResponse = mgmtClient.inspectCache("700");
    this.checkCacheInspectString(inspectResponse, "success", SC_CACHE_ENTRY_STATE.LOADED, "700", "0", "700/0/0=51&", "unset");

    // 3: start cache guardian - publish 1 large (50MB) Appendix
    SCSubscribeMessage subMsg = new SCSubscribeMessage();
    subMsg.setMask(TestConstants.mask);
    subMsg.setSessionInfo(TestConstants.publish50MBAppendixMsgCmd);
    subMsg.setData("700");
    guardianClient.startCacheGuardian(TestConstants.cacheGuardian1, subMsg, cacheGuardianCbk);

    // 4: try reading data from cache - cache loading exception (appendix loading)
    Thread.sleep(2000); // assure publish appendix started
    try {
View Full Code Here

TOP

Related Classes of org.serviceconnector.api.SCSubscribeMessage

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.