Package org.apache.sandesha2.storage.beanmanagers

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


    SenderBean findBean = new SenderBean();
    findBean.setMessageType(Sandesha2Constants.MessageTypes.ACK);
    findBean.setSend(true);
    findBean.setToAddress(target.getAddress());

    Collection collection = retransmitterBeanMgr.find(findBean);
   
    if (transaction != null && transaction.isActive())
      transaction.commit();
   
    transaction = storageManager.getTransaction();
View Full Code Here


    SenderBean findBean = new SenderBean();
    findBean.setMessageType(Sandesha2Constants.MessageTypes.ACK);
    findBean.setSend(true);
    findBean.setReSend(false);
    findBean.setSequenceID(sequenceId);
    Collection coll = retransmitterBeanMgr.find(findBean);
    Iterator it = coll.iterator();

    while(it.hasNext()) {
      SenderBean oldAckBean = (SenderBean) it.next();
      if(oldAckBean.getTimeToSend() < timeToSend)
View Full Code Here

        senderBean.setSequenceID(sequenceId);
        senderBean.setSend(true);
        senderBean.setReSend(false);
       
        // Find any sender beans for the to address.
        List beans = senderManager.find(senderBean);
       
        //only the ackRequested bean will be present.
        assertTrue("SenderBeans found when the list should be empty", (beans.size()==1));
       
        SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
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 findBean = new SenderBean();
    findBean.setMessageType(Sandesha2Constants.MessageTypes.ACK);
    findBean.setSend(true);
    findBean.setToAddress(target.getAddress());

    Collection collection = retransmitterBeanMgr.find(findBean);
    Iterator it = collection.iterator();
    while (it.hasNext()) {
      SenderBean ackBean = (SenderBean) it.next();

      // Piggybacking will happen only if the end of ack interval (timeToSend) is not reached.
View Full Code Here

      // removing old acks.
      SenderBean findBean = new SenderBean();
      findBean.setMessageType(Sandesha2Constants.MessageTypes.ACK);
      findBean.setSend(true);
      findBean.setReSend(false);
      Collection coll = retransmitterBeanMgr.find(findBean);
      Iterator it = coll.iterator();

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

    SenderBean findBean = new SenderBean();
    findBean.setMessageType(Sandesha2Constants.MessageTypes.ACK);
    findBean.setSend(true);
    findBean.setReSend(false);
    findBean.setSequenceID(sequenceId);
    Collection coll = retransmitterBeanMgr.find(findBean);
    Iterator it = coll.iterator();

    while(it.hasNext()) {
      SenderBean oldAckBean = (SenderBean) it.next();
      if(oldAckBean.getTimeToSend() < timeToSend)
View Full Code Here

    findSenderBean.setTimeToSend(System.currentTimeMillis());
   
    //finding the beans that go with the criteria of the passed SenderBean
    //The reSend flag is ignored for this selection, so there is no need to
    //set it.
    Collection collection = senderBeanMgr.find(findSenderBean);
   
    //removing beans that does not pass the resend test
    for (Iterator it=collection.iterator();it.hasNext();) {
      SenderBean bean = (SenderBean) it.next();
      if (!bean.isReSend() && bean.getSentCount()>0)
View Full Code Here

    SequenceManager.updateLastActivatedTime(sequencePropertyKey, storageManager);

    SenderBean input = new SenderBean();
    input.setSend(true);
    input.setReSend(true);
    Collection retransmitterEntriesOfSequence = senderBeanMgr.find(input);

    ArrayList ackedMessagesList = new ArrayList();
    while (ackRangeIterator.hasNext()) {
      AcknowledgementRange ackRange = (AcknowledgementRange) ackRangeIterator.next();
      long lower = ackRange.getLowerValue();
View Full Code Here

    findBean.setSend(true);
    findBean.setReSend(false);

    String carrietTo = rmMessageContext.getTo().getAddress();

    Collection collection = senderBeanMgr.find(findBean);

    Iterator it = collection.iterator();

    piggybackLoop: while (it.hasNext()) {
      SenderBean ackBean = (SenderBean) it.next();
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.