/** * @param ctx Kernal context. */ public GridOffHeapProcessor(GridKernalContext ctx) { super(ctx); marsh = ctx.config().getMarshaller(); }
/** {@inheritDoc} */ @Override public boolean binaryEnabled() { return ctx.config().getMarshaller() instanceof BinaryMarshaller; } }
/** * @return Marshaller. */ public Marshaller marshaller() { return ctx.config().getMarshaller(); }
/** * @return Marshaller. */ public Marshaller marshaller() { return kernalCtx.config().getMarshaller(); }
@Override public boolean apply(IgniteConfiguration cfg) { return cfg.getMarshaller() instanceof BinaryMarshaller; } })
/** * @param ctx Kernal context. */ public GridTaskProcessor(GridKernalContext ctx) { super(ctx); marsh = ctx.config().getMarshaller(); discoLsnr = new TaskDiscoveryListener(); }
/** * @param ctx Kernal context. */ @SuppressWarnings("deprecation") public CacheObjectBinaryProcessorImpl(GridKernalContext ctx) { super(ctx); marsh = ctx.grid().configuration().getMarshaller(); }
/** * @param type Type name to check. * @return {@code True} if class not found. */ protected TypeKind kindForName(String type) { return kindForName(type, ignite.configuration().getMarshaller() instanceof BinaryMarshaller); }
/** {@inheritDoc} */ @Override public boolean configuredConvertBinary() { return !(ctx.config().getMarshaller() instanceof BinaryMarshaller && cfg.isStoreKeepBinary()); } }
/** {@inheritDoc} */ @SuppressWarnings("RedundantIfStatement") @Override public boolean apply(IgniteConfiguration cfg) { if (cfg.getMarshaller() != null && !(cfg.getMarshaller() instanceof BinaryMarshaller)) return false; if (cfg.isPeerClassLoadingEnabled()) return false; return true; } })
/** * @param ig Ignite. * @return If binary marshaller is used. */ private boolean isBinaryMarshallerUsed(Ignite ig) { return ig.configuration().getMarshaller() == null || ig.configuration().getMarshaller() instanceof BinaryMarshaller; }
/** * Checks whether a cache should be undeployed in SHARED or CONTINUOUS modes. * * @param g Ignite node. * @return {@code true} if the cache has to be undeployed, {@code false} otherwise. */ protected boolean isCacheUndeployed(Ignite g) { return !(g.configuration().getMarshaller() instanceof BinaryMarshaller); }
/** {@inheritDoc} */ @Override protected VisorBinaryMetadataCollectorTaskResult run(VisorBinaryMetadataCollectorTaskArg arg) { Marshaller marsh = ignite.configuration().getMarshaller(); IgniteBinary binary = marsh == null || marsh instanceof BinaryMarshaller ? ignite.binary() : null; return new VisorBinaryMetadataCollectorTaskResult(0L, VisorBinaryMetadata.list(binary)); }
@Override public void run() { try { start.await(); if (ii == 0) ign.configuration().getMarshaller().unmarshal(one, null); else ign.configuration().getMarshaller().unmarshal(two, null); } catch (Exception e) { e.printStackTrace(); } } });
@Override public Void call() throws Exception { int node = idx.getAndIncrement(); Ignite ignite = startGrid(node); IgniteCache<Object, Object> cache = ignite.cache(DEFAULT_CACHE_NAME); for (Map.Entry<Integer, byte[]> e : dataBytes.entrySet()) { Object obj = ignite.configuration().getMarshaller().unmarshal(e.getValue(), null); cache.put(e.getKey(), obj); } ignite.cache(DEFAULT_CACHE_NAME).getAll(dataBytes.keySet()); return null; } }, 10, "test-thread");
@SuppressWarnings("deprecation") @Override public Void call() throws Exception { ignite(0).configuration().getMarshaller().marshal(new C1()); ignite(0).configuration().getMarshaller().marshal(new C2()); return null; } }, 64, "marshal");
/** {@inheritDoc} */ @Override public void p2pMarshal(GridKernalContext ctx) throws IgniteCheckedException { assert ctx != null; assert ctx.config().isPeerClassLoadingEnabled(); if (filter != null) { Class cls = U.detectClass(filter); clsName = cls.getName(); GridDeployment dep = ctx.deploy().deploy(cls, U.detectClassLoader(cls)); if (dep == null) throw new IgniteDeploymentCheckedException("Failed to deploy event filter: " + filter); depInfo = new GridDeploymentInfoBean(dep); filterBytes = U.marshal(ctx.config().getMarshaller(), filter); } }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { marsh = grid().configuration().getMarshaller(); igniteInstanceName = grid().configuration().getIgniteInstanceName(); }
/** */ private void runRemoteUnmarshal() throws Exception { Ignite ignite = startGrid(0); byte[] one = ignite.configuration().getMarshaller().marshal(DeclaredBodyEnum.ONE); byte[] two = ignite.configuration().getMarshaller().marshal(DeclaredBodyEnum.TWO); startGrid(1); ignite.compute(ignite.cluster().forRemotes()).call(new UnmarshalCallable(one, two)); }
/** * @param mode Deployment mode. * @throws Exception If failed. */ private void doCheckStarted(DeploymentMode mode) throws Exception { startGridsMultiThreaded(2); checkTopology(2); assertEquals(mode, ignite(0).configuration().getDeploymentMode()); assert ignite(0).configuration().getMarshaller() instanceof BinaryMarshaller; IgniteCache rCache = ignite(0).cache(REPLICATED_CACHE); checkPutCache(rCache); IgniteCache pCache = ignite(0).cache(PARTITIONED_CACHE); checkPutCache(pCache); }