Package org.apache.zookeeper.server
Class ReferenceCountedACLCache
- java.lang.Object
-
- org.apache.zookeeper.server.ReferenceCountedACLCache
-
public class ReferenceCountedACLCache extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ReferenceCountedACLCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddUsage(java.lang.Long acl)java.lang.LongconvertAcls(java.util.List<ACL> acls)converts the list of acls to a long.java.util.List<ACL>convertLong(java.lang.Long longVal)converts a long to a list of acls.voiddeserialize(org.apache.jute.InputArchive ia)voidpurgeUnused()voidremoveUsage(java.lang.Long acl)voidserialize(org.apache.jute.OutputArchive oa)intsize()
-
-
-
Method Detail
-
convertAcls
public java.lang.Long convertAcls(java.util.List<ACL> acls)
converts the list of acls to a long. Increments the reference counter for this ACL.- Parameters:
acls-- Returns:
- a long that map to the acls
-
convertLong
public java.util.List<ACL> convertLong(java.lang.Long longVal)
converts a long to a list of acls.- Parameters:
longVal-- Returns:
- a list of ACLs that map to the long
-
deserialize
public void deserialize(org.apache.jute.InputArchive ia) throws java.io.IOException- Throws:
java.io.IOException
-
serialize
public void serialize(org.apache.jute.OutputArchive oa) throws java.io.IOException- Throws:
java.io.IOException
-
size
public int size()
-
addUsage
public void addUsage(java.lang.Long acl)
-
removeUsage
public void removeUsage(java.lang.Long acl)
-
purgeUnused
public void purgeUnused()
-
-