/** * Load data from the given map. * * @param <T> type of data being loaded * @param map the map of keys to values that needs to be loaded */ public <T> Future<?> loadData(Map<String, T> map) { return loadData(map.entrySet().iterator()); }
/** * Load data from the given iterator. * * @param <T> type of data being loaded * @param i the iterator of data to load */ public <T> Future<?> loadData(Iterator<Map.Entry<String, T>> i) { Future<Boolean> mostRecent = null; while (i.hasNext()) { Map.Entry<String, T> e = i.next(); mostRecent = push(e.getKey(), e.getValue()); watch(e.getKey(), mostRecent); } return mostRecent == null ? new ImmediateFuture(true) : mostRecent; }
/** * Load data from the given iterator. * * @param <T> type of data being loaded * @param i the iterator of data to load */ public <T> Future<?> loadData(Iterator<Map.Entry<String, T>> i) { Future<Boolean> mostRecent = null; while (i.hasNext()) { Map.Entry<String, T> e = i.next(); mostRecent = push(e.getKey(), e.getValue()); watch(e.getKey(), mostRecent); } return mostRecent == null ? new ImmediateFuture(true) : mostRecent; }
/** * Load data from the given iterator. * * @param <T> type of data being loaded * @param i the iterator of data to load */ public <T> Future<?> loadData(Iterator<Map.Entry<String, T>> i) { Future<Boolean> mostRecent = null; while (i.hasNext()) { Map.Entry<String, T> e = i.next(); mostRecent = push(e.getKey(), e.getValue()); watch(e.getKey(), mostRecent); } return mostRecent == null ? new ImmediateFuture(true) : mostRecent; }
/** * Load data from the given map. * * @param <T> type of data being loaded * @param map the map of keys to values that needs to be loaded */ public <T> Future<?> loadData(Map<String, T> map) { return loadData(map.entrySet().iterator()); }
/** * Load data from the given iterator. * * @param <T> type of data being loaded * @param i the iterator of data to load */ public <T> Future<?> loadData(Iterator<Map.Entry<String, T>> i) { Future<Boolean> mostRecent = null; while(i.hasNext()) { Map.Entry<String, T> e = i.next(); mostRecent = push(e.getKey(), e.getValue()); watch(e.getKey(), mostRecent); } return mostRecent == null ? new ImmediateFuture(true) : mostRecent; }
/** * Load data from the given map. * * @param <T> type of data being loaded * @param map the map of keys to values that needs to be loaded */ public <T> Future<?> loadData(Map<String, T> map) { return loadData(map.entrySet().iterator()); }
/** * Load data from the given iterator. * * @param <T> type of data being loaded * @param i the iterator of data to load */ public <T> Future<?> loadData(Iterator<Map.Entry<String, T>> i) { Future<Boolean> mostRecent = null; while(i.hasNext()) { Map.Entry<String, T> e = i.next(); mostRecent = push(e.getKey(), e.getValue()); watch(e.getKey(), mostRecent); } return mostRecent == null ? new ImmediateFuture(true) : mostRecent; }
/** * Load data from the given map. * * @param <T> type of data being loaded * @param map the map of keys to values that needs to be loaded */ public <T> Future<?> loadData(Map<String, T> map) { return loadData(map.entrySet().iterator()); }
/** * Load data from the given iterator. * * @param <T> type of data being loaded * @param i the iterator of data to load */ public <T> Future<?> loadData(Iterator<Map.Entry<String, T>> i) { Future<Boolean> mostRecent = null; while (i.hasNext()) { Map.Entry<String, T> e = i.next(); mostRecent = push(e.getKey(), e.getValue()); watch(e.getKey(), mostRecent); } return mostRecent == null ? new ImmediateFuture(true) : mostRecent; }
/** * Load data from the given map. * * @param <T> type of data being loaded * @param map the map of keys to values that needs to be loaded */ public <T> Future<?> loadData(Map<String, T> map) { return loadData(map.entrySet().iterator()); }
/** * Load data from the given map. * * @param <T> type of data being loaded * @param map the map of keys to values that needs to be loaded */ public <T> Future<?> loadData(Map<String, T> map) { return loadData(map.entrySet().iterator()); }