1 9 package org.ozoneDB.core; 10 11 import java.util.WeakHashMap ; 12 13 import java.util.Iterator ; 14 15 16 17 import org.ozoneDB.core.DbRemote.DbLocalClient; 18 19 23 24 public class LocalClientTracker { 25 26 32 33 protected WeakHashMap localClients; 34 35 38 protected final static Object value = new Object (); 39 40 public LocalClientTracker() { 41 localClients = new WeakHashMap (); 42 } 43 44 47 public void addClient(DbLocalClient client) { 48 synchronized (localClients) { 49 localClients.put(client,value); 50 } 51 } 52 53 60 public void startFilterDatabaseObjectReferencesExports(GarbageCollector garbageCollector) { 61 synchronized (localClients) { 62 Iterator i = localClients.keySet().iterator(); 63 64 70 while (i.hasNext()) { 71 ((DbLocalClient) i.next()).getProxyObjectGate().startFilterDatabaseObjectReferencesExports(garbageCollector); 72 } 73 } 74 } 75 } | Popular Tags |