Package org.jgroups

Examples of org.jgroups.Header


        int hdrs_size=0;
        for(Map.Entry<Short,Header> entry: hdrs.entrySet()) {

            Class clazz=ClassConfigurator.getProtocol(entry.getKey());
            String name=clazz != null? clazz.getSimpleName() : null;
            Header hdr=entry.getValue();
            int size=hdr.size();
            hdrs_size+=size;
            sb.append(name).append(": ").append(" ").append(size).append(" bytes\n");
        }
        sb.append("headers=").append(hdrs_size).append(", total msg size=").append(msg.size());
        sb.append(", msg payload=").append(msg.getLength()).append("\n");
View Full Code Here


    }


    public static void testPutHeaderIfAbsent() {
        Headers hdrs=createHeaders(3);
        Header hdr=hdrs.putHeaderIfAbsent(FRAG_ID, new MyHeader());
        assert hdr == h2;
        assert hdr == hdrs.getHeader(FRAG_ID);
        assert hdrs.size() == 3;
        assert hdrs.capacity() == 3;
View Full Code Here

TOP

Related Classes of org.jgroups.Header

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.