Package org.jgroups.util
Class NameCache
- java.lang.Object
-
- org.jgroups.util.NameCache
-
public class NameCache extends java.lang.Object
Maintains the mappings between addresses and logical names (moved out of UUID.cache into a separate class)- Since:
- 4.0
- Author:
- Bela Ban
-
-
Field Summary
Fields Modifier and Type Field Description protected static LazyRemovalCache<Address,java.lang.String>
cache
Keeps track of associations between addresses and logical namesprotected static LazyRemovalCache.Printable<Address,LazyRemovalCache.Entry<java.lang.String>>
print_function
-
Constructor Summary
Constructors Constructor Description NameCache()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
add(java.util.Map<Address,java.lang.String> map)
static void
add(Address uuid, java.lang.String logical_name)
static java.lang.String
get(Address logical_addr)
static java.util.Map<Address,java.lang.String>
getContents()
Returns a copy of the cache's contentsstatic java.lang.String
printCache()
static void
remove(Address addr)
static void
removeAll(java.util.Collection<Address> mbrs)
static void
retainAll(java.util.Collection<Address> logical_addrs)
-
-
-
Field Detail
-
cache
protected static final LazyRemovalCache<Address,java.lang.String> cache
Keeps track of associations between addresses and logical names
-
print_function
protected static final LazyRemovalCache.Printable<Address,LazyRemovalCache.Entry<java.lang.String>> print_function
-
-
Method Detail
-
add
public static void add(Address uuid, java.lang.String logical_name)
-
add
public static void add(java.util.Map<Address,java.lang.String> map)
-
get
public static java.lang.String get(Address logical_addr)
-
getContents
public static java.util.Map<Address,java.lang.String> getContents()
Returns a copy of the cache's contents
-
remove
public static void remove(Address addr)
-
removeAll
public static void removeAll(java.util.Collection<Address> mbrs)
-
retainAll
public static void retainAll(java.util.Collection<Address> logical_addrs)
-
printCache
public static java.lang.String printCache()
-
-