/** * @return Data storage configuration. */ private DataStorageConfiguration dataStorageConfiguration() { return ctx.config().getDataStorageConfiguration(); }
/** {@inheritDoc} */ @Override public boolean binaryEnabled() { return ctx.config().getMarshaller() instanceof BinaryMarshaller; } }
/** * @return Marshaller. */ public Marshaller marshaller() { return ctx.config().getMarshaller(); }
/** * @param ctx Context. */ public DataStructuresProcessor(GridKernalContext ctx) { super(ctx); dsMap = new ConcurrentHashMap<>(INITIAL_CAPACITY); dfltAtomicCfg = ctx.config().getAtomicConfiguration(); }
/** * @return Client configuration. */ protected ConnectorConfiguration config() { return ctx.config().getConnectorConfiguration(); }
/** * @return Client configuration. */ private ConnectorConfiguration config() { return ctx.config().getConnectorConfiguration(); }
/** * @param ctx Context. * @param nodeId Target node ID. * @return Communication information future. */ public static IgniteInternalFuture<String> dumpCommunicationInfo(GridKernalContext ctx, UUID nodeId) { if (ctx.config().getCommunicationSpi() instanceof TcpCommunicationSpi) return ((TcpCommunicationSpi) ctx.config().getCommunicationSpi()).dumpNodeStatistics(nodeId); else return new GridFinishedFuture<>("Unexpected communication SPI: " + ctx.config().getCommunicationSpi()); }
@Override public Object deserialize(byte[] bytes) throws Exception { ClassLoader clsLdr = ctx != null ? U.resolveClassLoader(ctx.config()) : null; return U.unmarshal(marshaller, bytes, clsLdr); } };
/** {@inheritDoc} */ @Override public void onKernalStart(boolean active) { if (ctx.config().isDaemon() || !active) return; onKernalStart0(); }
/** * The task for changing transaction timeout on partition map exchange processed by exchange worker. * * @param msg Message. */ public void processTxTimeoutOnPartitionMapExchangeChange(TxTimeoutOnPartitionMapExchangeChangeMessage msg) { assert msg != null; long timeout = ctx.config().getTransactionConfiguration().getTxTimeoutOnPartitionMapExchange(); if (timeout != msg.getTimeout()) ctx.config().getTransactionConfiguration().setTxTimeoutOnPartitionMapExchange(msg.getTimeout()); }
/** {@inheritDoc} */ @Override protected void registerMetricsMBeans(IgniteConfiguration cfg) { super.registerMetricsMBeans(cfg); registerMetricsMBean( cctx.kernalContext().config(), MBEAN_GROUP, MBEAN_NAME, persStoreMetrics, DataStorageMetricsMXBean.class ); }
/** * @param node Problem node. * @param err Error. */ public void resolveCommunicationError(ClusterNode node, Exception err) { DiscoverySpi spi = getSpi(); if (!supportsCommunicationErrorResolve(spi) || !supportsCommunicationErrorResolve(ctx.config().getCommunicationSpi())) throw new UnsupportedOperationException(); ((IgniteDiscoverySpi)spi).resolveCommunicationFailure(node, err); }
/** * @param ctx Kernal context. */ public FilePageStoreManager(GridKernalContext ctx) { igniteCfg = ctx.config(); DataStorageConfiguration dsCfg = igniteCfg.getDataStorageConfiguration(); assert dsCfg != null; this.dsCfg = dsCfg; pageStoreV1FileIoFactory = pageStoreFileIoFactory = dsCfg.getFileIOFactory(); marshaller = MarshallerUtils.jdkMarshaller(ctx.igniteInstanceName()); }
/** {@inheritDoc} */ @Override public void start() throws IgniteCheckedException { FailureHandler hnd = ctx.config().getFailureHandler(); if (hnd == null) hnd = getDefaultFailureHandler(); reserveBuf = new byte[IgniteSystemProperties.getInteger( IgniteSystemProperties.IGNITE_FAILURE_HANDLER_RESERVE_BUFFER_SIZE, 64 * 1024)]; assert hnd != null; this.hnd = hnd; U.quietAndInfo(log, "Configured failure handler: [hnd=" + hnd + ']'); }
/** {@inheritDoc} */ @Override protected void onKernalStart0() throws IgniteCheckedException { if ((getSpi() instanceof TcpDiscoverySpi) && Boolean.TRUE.equals(ctx.config().isClientMode()) && !getSpi().isClientMode()) ctx.performance().add("Enable client mode for TcpDiscoverySpi " + "(set TcpDiscoverySpi.forceServerMode to false)"); }
/** {@inheritDoc} */ @Override public void stop(boolean cancel) throws IgniteCheckedException { if (ctx.config().isDaemon()) return; ctx.io().removeMessageListener(TOPIC_CONTINUOUS); for (IgniteThread thread : bufCheckThreads.values()) { U.interrupt(thread); U.join(thread); } if (log.isDebugEnabled()) log.debug("Continuous processor stopped."); }
/** {@inheritDoc} */ @Override public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolation isolation) { A.notNull(concurrency, "concurrency"); A.notNull(isolation, "isolation"); TransactionConfiguration cfg = CU.transactionConfiguration(ctx, ctx.kernalContext().config()); return txStart( concurrency, isolation, cfg.getDefaultTxTimeout(), 0 ); }
/** * @param mgr Database shared manager. * @throws IgniteCheckedException If failed. */ private void txLogPageStoreInit(IgniteCacheDatabaseSharedManager mgr) throws IgniteCheckedException { assert CU.isPersistenceEnabled(ctx.config()); //noinspection ConstantConditions ctx.cache().context().pageStore().initialize(TX_LOG_CACHE_ID, 1, TX_LOG_CACHE_NAME, mgr.dataRegion(TX_LOG_CACHE_NAME).memoryMetrics()); }