Methods Summary |
---|
public static synchronized long | getClientVersion(long containerId, java.lang.Object oid)
Map<Object, Long> map = id2Map.get(new Long(containerId));
long version = NO_VERSION;
if (map != null) {
Long vv = map.get(oid);
version = (vv != null) ? vv : NO_VERSION;
}
return version;
|
public static void | removeAllEntries(long containerId)
id2Map.remove(containerId);
|
public static synchronized void | removeClientVersion(long containerId, java.lang.Object oid)
Map<Object, Long> map = id2Map.get(new Long(containerId));
if (map != null) {
map.remove(oid);
}
|
public static synchronized void | setClientVersion(long containerId, java.lang.Object oid, long version)
if (version != NO_VERSION) {
Map<Object, Long> map = id2Map.get(new Long(containerId));
if (map == null) {
map = new HashMap<Object, Long>();
id2Map.put(new Long(containerId), map);
}
Long existingVersion = map.get(oid);
if ((existingVersion == null) || (version > existingVersion)) {
map.put(oid, version);
}
}
|