Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-2094

Add convenience method Rsp.readIn

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Minor
    • 3.6.11, 4.0
    • 3.6.10, 4.0
    • None

    Description

      In Infinispan, during a staggered get we prepare several Rsp s in RspList and then for each Rsp we send one message. As the RspList can be accessed by multiple threads but we don't want to synchronize the access, we just get the Rsp and fill it from the (other) received Rsp. However the fill requires several ifs:

                  if (rsp.hasException()) {
                     futureRsp.setException(rsp.getException());
                  } else if (rsp.wasSuspected()) {
                     futureRsp.setSuspected();
                  } else if (rsp.wasUnreachable()) {
                     futureRsp.setUnreachable();
                  } else {
                     futureRsp.setValue(rsp.getValue());
                  }
      

      Let's add a convenience method that will just read in the flags and value.

      Attachments

        Activity

          People

            rvansa1@redhat.com Radim Vansa (Inactive)
            rvansa1@redhat.com Radim Vansa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: