CQC takes very long time to initialize
870823Apr 19 2012 — edited Apr 29 2012Hi ,
I'm trying to connect as an extended client by using Continuous Query Cache (CQC) and this cache node contains 380,000 records.
I'm initializing the cache as follows.
NamedCache::Handle hCache = gce::coherence::DerivedCQC::create(CacheFactory::getCache(cacheName), AlwaysFilter::getInstance(), true);
I'm asking continuous query cache both keys and values in order to get minimum time while reading from cache. Is caching both keys and values makes the slowness or something else (actually it takes 5 minutes to do the initialization). Each object put into the cache is 16 byte and in addition to above cache there's some other caches as well.
What do I need to improve timing during initialization becasuse in a case of failover it will be huge problem for us.
regards,
Sura
------------------
DerivedCQC.hpp
#include "coherence/lang.ns"
#include "coherence/net/cache/ContinuousQueryCache.hpp"
#include "coherence/net/NamedCache.hpp"
#include "coherence/util/Filter.hpp"
#include "coherence/util/MapListener.hpp"
using namespace coherence::lang;
using coherence::net::cache::ContinuousQueryCache;
using coherence::net::NamedCache;
using coherence::util::Filter;
using coherence::util::MapListener;
namespace gce {
namespace coherence {
class DerivedCQC
: public class_spec<DerivedCQC,
extends<ContinuousQueryCache> > {
friend class factory<DerivedCQC>;
protected:
DerivedCQC(NamedCache::Handle hCache,
Filter::View vFilter, bool fCacheValues = false, MapListener::Handle hListener = NULL)
: super(hCache, vFilter, fCacheValues, hListener) {
}
public:
virtual bool containsKey(Object::View vKey) const {
return m_hMapLocal->containsKey(vKey);
}
};
}
}
--------------------------------