@Override public synchronized int addUpdateListener(KContentUpdateListener p_interceptor) { if (additionalInterceptors == null) { additionalInterceptors = new ArrayIntMap<KContentUpdateListener>( KConfig.CACHE_INIT_SIZE, KConfig.CACHE_LOAD_FACTOR); } int newID = randomInterceptorID(); additionalInterceptors.put(newID, p_interceptor); return newID; }
@Override public synchronized void removeUpdateListener(int id) { if (additionalInterceptors != null) { additionalInterceptors.remove(id); } }