public void InjectIgnite(IIgnite ignite) { // Propagate injection ResourceProcessor.Inject(_func, (IgniteProxy)ignite); }
/// <summary> /// Initializes this instance with a grid. /// </summary> /// <param name="grid">Grid.</param> public void Init(Ignite grid) { ResourceProcessor.Inject(_store, grid); }
/// <summary> /// Constructor. /// </summary> /// <param name="qry">Query.</param> /// <param name="marsh">Marshaller.</param> /// <param name="keepBinary">Keep binary flag.</param> /// <param name="createTargetCb">The initialization callback.</param> /// <param name="initialQry">The initial query.</param> public ContinuousQueryHandleImpl(ContinuousQuery <TK, TV> qry, Marshaller marsh, bool keepBinary, Func <Action <BinaryWriter>, IPlatformTargetInternal> createTargetCb, IQueryBaseInternal initialQry) { _marsh = marsh; _keepBinary = keepBinary; _lsnr = qry.Listener; _filter = qry.Filter; // 1. Inject resources. ResourceProcessor.Inject(_lsnr, _marsh.Ignite); ResourceProcessor.Inject(_filter, _marsh.Ignite); try { // 2. Allocate handle. _hnd = _marsh.Ignite.HandleRegistry.Allocate(this); // 3. Call Java. _nativeQry = createTargetCb(writer => { writer.WriteLong(_hnd); writer.WriteBoolean(qry.Local); writer.WriteBoolean(qry.IncludeExpired); writer.WriteBoolean(_filter != null); var javaFilter = _filter as PlatformJavaObjectFactoryProxy; if (javaFilter != null) { writer.WriteObject(javaFilter.GetRawProxy()); } else { var filterHolder = _filter == null || qry.Local ? null : new ContinuousQueryFilterHolder(_filter, _keepBinary); writer.WriteObject(filterHolder); } writer.WriteInt(qry.BufferSize); writer.WriteLong((long)qry.TimeInterval.TotalMilliseconds); writer.WriteBoolean(qry.AutoUnsubscribe); if (initialQry != null) { writer.WriteInt((int)initialQry.OpId); initialQry.Write(writer, _keepBinary); } else { writer.WriteInt(-1); // no initial query } }); // 4. Initial query. _nativeInitialQueryCursor = _nativeQry.OutObjectInternal(0); _initialQueryIsFields = initialQry is SqlFieldsQuery; } catch (Exception) { if (_hnd > 0) { _marsh.Ignite.HandleRegistry.Release(_hnd); } if (_nativeQry != null) { _nativeQry.Dispose(); } if (_nativeInitialQueryCursor != null) { _nativeInitialQueryCursor.Dispose(); } throw; } }
/** <inheritDoc /> */ public void Inject(Ignite grid) { ResourceProcessor.Inject(_rdc, grid); }
/** <inheritDoc /> */ public void Inject(IIgniteInternal grid) { ResourceProcessor.Inject(_clo, grid); }
/** <inheritdoc /> */ public void InjectResources(object target) { IgniteArgumentCheck.NotNull(target, "target"); ResourceProcessor.Inject(target, _pluginProcessor.Ignite); }
/// <summary> /// Injects the resources. /// </summary> private void InjectResources() { ResourceProcessor.Inject(_pred, _marsh.Ignite); }
/** <inheritDoc /> */ public void Inject(Ignite grid) { ResourceProcessor.Inject(_action, grid); }
/** <inheritDoc /> */ public void Inject(Ignite grid) { _ignite = grid; ResourceProcessor.Inject(_filter, grid); }