use of org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore in project ignite by apache.
the class GridCacheStoreManagerAdapter method initialize.
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override
public void initialize(@Nullable CacheStore cfgStore, Map sesHolders) throws IgniteCheckedException {
GridKernalContext ctx = igniteContext();
CacheConfiguration cfg = cacheConfiguration();
writeThrough = cfg.isWriteThrough();
this.cfgStore = cfgStore;
store = cacheStoreWrapper(ctx, cfgStore, cfg);
singleThreadGate = store == null ? null : new CacheStoreBalancingWrapper<>(store, cfg.getStoreConcurrentLoadAllThreshold());
ThreadLocal<SessionData> sesHolder0 = null;
if (cfgStore != null) {
sesHolder0 = ((Map<CacheStore, ThreadLocal>) sesHolders).get(cfgStore);
if (sesHolder0 == null) {
sesHolder0 = new ThreadLocal<>();
locSes = new ThreadLocalSession(sesHolder0);
if (ctx.resource().injectStoreSession(cfgStore, locSes))
sesHolders.put(cfgStore, sesHolder0);
} else
locSes = new ThreadLocalSession(sesHolder0);
}
sesHolder = sesHolder0;
locStore = U.hasAnnotation(cfgStore, CacheLocalStore.class);
if (cfgStore instanceof CacheJdbcPojoStore)
alwaysKeepBinary = true;
}
Aggregations