@Override public void write(JSONWriter jsonWriter) { LinkedHashMap<String , DocCollection> map = new LinkedHashMap<>(); for (Entry<String, CollectionRef> e : collectionStates.entrySet()) { // using this class check to avoid fetching from ZK in case of lazily loaded collection if (e.getValue().getClass() == CollectionRef.class) { // check if it is a lazily loaded collection outside of clusterstate.json DocCollection coll = e.getValue().get(); if (coll.getStateFormat() == 1) { map.put(coll.getName(),coll); } } } jsonWriter.write(map); }
@Override public void write(JSONWriter jsonWriter) { LinkedHashMap<String , DocCollection> map = new LinkedHashMap<>(); for (Entry<String, CollectionRef> e : collectionStates.entrySet()) { // using this class check to avoid fetching from ZK in case of lazily loaded collection if (e.getValue().getClass() == CollectionRef.class) { // check if it is a lazily loaded collection outside of clusterstate.json DocCollection coll = e.getValue().get(); if (coll.getStateFormat() == 1) { map.put(coll.getName(),coll); } } } jsonWriter.write(map); }
if (col.getStateFormat() > 1) collectionStateCache.put(collection, new ExpiringCachedDocCollection(col)); return col;
if (fetchedCol.getStateFormat() > 1) collectionStateCache.put(collection, new ExpiringCachedDocCollection(fetchedCol));
if (coll.getStateFormat()>1) { if(requestedCollections == null) requestedCollections = new ArrayList<>(requestedCollectionNames.size()); requestedCollections.add(coll);
if (coll.getStateFormat()>1) { if(requestedCollections == null) requestedCollections = new ArrayList<>(requestedCollectionNames.size()); requestedCollections.add(coll);