use of org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl in project ignite by apache.
the class GridCacheProcessor method start.
/** {@inheritDoc} */
@SuppressWarnings({ "unchecked" })
@Override
public void start(boolean activeOnStart) throws IgniteCheckedException {
cachesInfo = new ClusterCachesInfo(ctx);
DeploymentMode depMode = ctx.config().getDeploymentMode();
if (!F.isEmpty(ctx.config().getCacheConfiguration())) {
if (depMode != CONTINUOUS && depMode != SHARED)
U.warn(log, "Deployment mode for cache is not CONTINUOUS or SHARED " + "(it is recommended that you change deployment mode and restart): " + depMode, "Deployment mode for cache is not CONTINUOUS or SHARED.");
}
initializeInternalCacheNames();
sharedCtx = createSharedContext(ctx, CU.startStoreSessionListeners(ctx, ctx.config().getCacheStoreSessionListenerFactories()));
transactions = new IgniteTransactionsImpl(sharedCtx);
// Start shared managers.
for (GridCacheSharedManager mgr : sharedCtx.managers()) mgr.start(sharedCtx);
if (activeOnStart && !ctx.config().isDaemon()) {
Map<String, CacheJoinNodeDiscoveryData.CacheInfo> caches = new HashMap<>();
Map<String, CacheJoinNodeDiscoveryData.CacheInfo> templates = new HashMap<>();
addCacheOnJoinFromConfig(caches, templates);
addCacheOnJoinFromPersistentStore(caches, templates);
CacheJoinNodeDiscoveryData discoData = new CacheJoinNodeDiscoveryData(IgniteUuid.randomUuid(), caches, templates, startAllCachesOnClientStart());
cachesInfo.onStart(discoData);
} else {
cachesInfo.onStart(new CacheJoinNodeDiscoveryData(IgniteUuid.randomUuid(), Collections.<String, CacheJoinNodeDiscoveryData.CacheInfo>emptyMap(), Collections.<String, CacheJoinNodeDiscoveryData.CacheInfo>emptyMap(), false));
}
if (log.isDebugEnabled())
log.debug("Started cache processor.");
}
use of org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl in project ignite by apache.
the class GridCacheProcessor method start.
/**
* {@inheritDoc}
*/
@SuppressWarnings({ "unchecked" })
@Override
public void start() throws IgniteCheckedException {
cachesInfo = new ClusterCachesInfo(ctx);
DeploymentMode depMode = ctx.config().getDeploymentMode();
if (!F.isEmpty(ctx.config().getCacheConfiguration())) {
if (depMode != CONTINUOUS && depMode != SHARED)
U.warn(log, "Deployment mode for cache is not CONTINUOUS or SHARED " + "(it is recommended that you change deployment mode and restart): " + depMode, "Deployment mode for cache is not CONTINUOUS or SHARED.");
}
initializeInternalCacheNames();
Collection<CacheStoreSessionListener> sessionListeners = CU.startStoreSessionListeners(ctx, ctx.config().getCacheStoreSessionListenerFactories());
sharedCtx = createSharedContext(ctx, sessionListeners);
transactions = new IgniteTransactionsImpl(sharedCtx);
// Start shared managers.
for (GridCacheSharedManager mgr : sharedCtx.managers()) mgr.start(sharedCtx);
if (!ctx.isDaemon()) {
Map<String, CacheInfo> caches = new HashMap<>();
Map<String, CacheInfo> templates = new HashMap<>();
addCacheOnJoinFromConfig(caches, templates);
CacheJoinNodeDiscoveryData discoData = new CacheJoinNodeDiscoveryData(IgniteUuid.randomUuid(), caches, templates, startAllCachesOnClientStart());
cachesInfo.onStart(discoData);
if (log.isDebugEnabled())
log.debug("Started cache processor.");
}
ctx.state().cacheProcessorStarted();
ctx.authentication().cacheProcessorStarted();
}
Aggregations