RunningState running = runningState.get();
if (running == null) return Collections.emptyList();
List<Cache<?, ?>> caches = new ArrayList<Cache<?, ?>>();
LocalDocumentStore localDocumentStore = running.documentStore().localStore();
caches.add(localDocumentStore.localCache());
// Add the binary store's cache, if there is one ...
BinaryStore store = running.binaryStore();
if (store instanceof InfinispanBinaryStore) {
InfinispanBinaryStore ispnStore = (InfinispanBinaryStore)store;
caches.addAll(ispnStore.getCaches());