Search in sources :

Example 1 with PingData

use of org.jgroups.protocols.PingData in project geode by apache.

the class AddressManager method up.

@SuppressWarnings("unchecked")
@Override
public Object up(Event evt) {
    switch(evt.getType()) {
        case Event.FIND_MBRS:
            List<Address> missing = (List<Address>) evt.getArg();
            Responses responses = new Responses(false);
            for (Address laddr : missing) {
                try {
                    if (laddr instanceof JGAddress) {
                        PingData pd = new PingData(laddr, true, laddr.toString(), newIpAddress(laddr));
                        responses.addResponse(pd, false);
                        updateUDPCache(pd);
                    }
                } catch (RuntimeException e) {
                    logger.warn("Unable to create PingData response", e);
                    throw e;
                }
            }
            return responses;
    }
    return up_prot.up(evt);
}
Also used : PingData(org.jgroups.protocols.PingData) Address(org.jgroups.Address) IpAddress(org.jgroups.stack.IpAddress) List(java.util.List) Responses(org.jgroups.util.Responses)

Aggregations

List (java.util.List)1 Address (org.jgroups.Address)1 PingData (org.jgroups.protocols.PingData)1 IpAddress (org.jgroups.stack.IpAddress)1 Responses (org.jgroups.util.Responses)1