Package org.apache.sandesha2.storage.beanmanagers

Examples of org.apache.sandesha2.storage.beanmanagers.SenderBeanMgr.find()


    SenderBean target = new SenderBean();
    target.setInternalSequenceID(internalSequenceId);
    target.setSend(false);
    target.setReSend(true);

    Iterator iterator = senderBeanMgr.find(target).iterator();
    while (iterator.hasNext()) {
      SenderBean tempBean = (SenderBean) iterator.next();

      // updating the application message
      String key = tempBean.getMessageContextRefKey();
View Full Code Here


      findBean.setMessageType(Sandesha2Constants.MessageTypes.ACK);

      // this will be set to true in the sandesha2TransportSender.
      findBean.setSend(true);
      findBean.setReSend(false);
      Collection coll = senderBeanMgr.find(findBean);
      Iterator it = coll.iterator();

      if (it.hasNext()) {
        SenderBean oldAckBean = (SenderBean) it.next();
        timeToSend = oldAckBean.getTimeToSend(); // If there is an
View Full Code Here

   
    //finding the beans that go with the criteria of the passed SenderBean
   
    //beans with reSend=true
    findSenderBean.setReSend(true);
    Collection collection = senderBeanMgr.find(findSenderBean);
   
    //beans with reSend=false
    findSenderBean.setReSend (false);
    Collection collection2 = senderBeanMgr.find(findSenderBean);
   
View Full Code Here

    findSenderBean.setReSend(true);
    Collection collection = senderBeanMgr.find(findSenderBean);
   
    //beans with reSend=false
    findSenderBean.setReSend (false);
    Collection collection2 = senderBeanMgr.find(findSenderBean);
   
    //all possible beans
    collection.addAll(collection2);
   
    //selecting a bean to send RANDOMLY. TODO- Should use a better mechanism.
View Full Code Here

            SenderBean matcher = new SenderBean();
            matcher.setSequenceID(outSequenceId);
           
            matcher.setMessageNumber(messageNo);
           
            List retransmitterBeans = retransmitterMgr.find(matcher);
            if (! retransmitterBeans.isEmpty()){
              Iterator retransmitterBeansItr = retransmitterBeans.iterator();
              while (retransmitterBeansItr.hasNext()) {
                SenderBean retransmitterBean = (SenderBean) retransmitterBeansItr.next();
                if (retransmitterBean != null) {
View Full Code Here

    // the sequence id.
    SenderBean target = new SenderBean();
    target.setInternalSequenceID(internalSequenceId);
    target.setSend(false);
   
    Iterator iterator = retransmitterMgr.find(target).iterator();
    while (iterator.hasNext()) {
      SenderBean tempBean = (SenderBean) iterator.next();

      // asking to send the application msssage
      tempBean.setSend(true);
View Full Code Here

    SenderBean findAckBean = new SenderBean ();
    findAckBean.setSequenceID(sequenceId);
    findAckBean.setMessageType(Sandesha2Constants.MessageTypes.ACK);
   
    SenderBeanMgr senderBeanMgr = storageManager.getSenderBeanMgr();
    Iterator ackBeans = senderBeanMgr.find(findAckBean).iterator();
    while (ackBeans.hasNext()) {
      SenderBean ackBean = (SenderBean) ackBeans.next();
      senderBeanMgr.delete(ackBean.getMessageID());
     
      storageManager.removeMessageContext(ackBean.getMessageContextRefKey());
View Full Code Here

  private static void cleanSendingSideData(String internalSequenceId, StorageManager storageManager) throws SandeshaException {

    SenderBeanMgr retransmitterBeanMgr = storageManager.getSenderBeanMgr();

    // removing retransmitterMgr entries and corresponding message contexts.
    Collection collection = retransmitterBeanMgr.find(internalSequenceId);
    Iterator iterator = collection.iterator();
    while (iterator.hasNext()) {
      SenderBean retransmitterBean = (SenderBean) iterator.next();
      retransmitterBeanMgr.delete(retransmitterBean.getMessageID());
View Full Code Here

        }
      }
    }
   
    //removing retransmitterMgr entries
    Collection collection = retransmitterBeanMgr.find(internalSequenceID);
    Iterator iterator = collection.iterator();
    while (iterator.hasNext()) {
      SenderBean retransmitterBean = (SenderBean) iterator.next();
      retransmitterBeanMgr.delete(retransmitterBean.getMessageID());
    }
View Full Code Here

      findBean.setMessageType(Sandesha2Constants.MessageTypes.ACK);
     
      //this will be set to true in the sandesha2TransportSender.
      findBean.setSend(true);
      findBean.setReSend(false);
      Collection coll = retransmitterBeanMgr.find(findBean);
      Iterator it = coll.iterator();

      if (it.hasNext()) {
        SenderBean oldAckBean = (SenderBean) it.next();
        timeToSend = oldAckBean.getTimeToSend();    //If there is an old ack. This ack will be sent in the old timeToSend.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.