Search in sources :

Example 1 with Index

use of org.apache.jute.Index in project zookeeper by apache.

the class ReferenceCountedACLCache method deserialize.

public synchronized void deserialize(InputArchive ia) throws IOException {
    clear();
    int i = ia.readInt("map");
    while (i > 0) {
        Long val = ia.readLong("long");
        if (aclIndex < val) {
            aclIndex = val;
        }
        List<ACL> aclList = new ArrayList<ACL>();
        Index j = ia.startVector("acls");
        while (!j.done()) {
            ACL acl = new ACL();
            acl.deserialize(ia, "acl");
            aclList.add(acl);
            j.incr();
        }
        longKeyMap.put(val, aclList);
        aclKeyMap.put(aclList, val);
        referenceCounter.put(val, new AtomicLongWithEquals(0));
        i--;
    }
}
Also used : AtomicLong(java.util.concurrent.atomic.AtomicLong) ArrayList(java.util.ArrayList) ACL(org.apache.zookeeper.data.ACL) Index(org.apache.jute.Index)

Aggregations

ArrayList (java.util.ArrayList)1 AtomicLong (java.util.concurrent.atomic.AtomicLong)1 Index (org.apache.jute.Index)1 ACL (org.apache.zookeeper.data.ACL)1