public AlterLifetimeConstantDurationStatelessPipe(AlterLifetimeStreamable <TKey, TPayload> stream, IStreamObserver <TKey, TPayload> observer) : base(stream, observer) { Contract.Requires(stream != null); this.constantDurationSelector = (long)((ConstantExpression)stream.DurationSelector.Body).Value; this.pool = MemoryManager.GetMemoryPool <TKey, TPayload>(stream.Properties.IsColumnar); }
public AlterLifetimeStartDependentDurationStatelessPipe(AlterLifetimeStreamable <TKey, TPayload> stream, IStreamObserver <TKey, TPayload> observer) : base(stream, observer) { Contract.Requires(stream != null); this.startTimeDurationSelector = (Expression <Func <long, long> >)stream.DurationSelector; this.startTimeDurationSelectorCompiled = this.startTimeDurationSelector.Compile(); this.pool = MemoryManager.GetMemoryPool <TKey, TPayload>(stream.Properties.IsColumnar); }
public PartitionedAlterLifetimeConstantDurationPipe(AlterLifetimeStreamable <TKey, TPayload> stream, IStreamObserver <TKey, TPayload> observer) : base(stream, observer) { Contract.Requires(stream != null); this.constantDurationSelector = (long)((ConstantExpression)stream.DurationSelector.Body).Value; this.startTimeSelector = (Expression <Func <long, long> >)stream.StartTimeSelector; this.startTimeSelectorCompiled = this.startTimeSelector.Compile(); this.pool = MemoryManager.GetMemoryPool <TKey, TPayload>(stream.Properties.IsColumnar); }
internal static IStreamObserver <TKey, TPayload> CreatePartitionedPayload( Type t, AlterLifetimeStreamable <TKey, TPayload> stream, IStreamObserver <TKey, TPayload> observer) { var outputType = typeof(PartitionedAlterLifetimeVariableDurationByKeyPipe <,>).MakeGenericType( t, typeof(TPayload)); return((IStreamObserver <TKey, TPayload>)Activator.CreateInstance(outputType, stream, observer)); }
internal static IStreamObserver <TKey, TPayload> CreatePartitionedStartDependent( Type t, AlterLifetimeStreamable <TKey, TPayload> stream, IStreamObserver <TKey, TPayload> observer) { var outputType = typeof(PartitionedAlterLifetimeStartDependentDurationPipe <, ,>).MakeGenericType( typeof(TKey), typeof(TPayload), t); return((IStreamObserver <TKey, TPayload>)Activator.CreateInstance(outputType, stream, observer)); }
public PartitionedAlterLifetimeVariableDurationByKeyPipe(AlterLifetimeStreamable <PartitionKey <TPartitionKey>, TPayload> stream, IStreamObserver <PartitionKey <TPartitionKey>, TPayload> observer) : base(stream, observer) { Contract.Requires(stream != null); this.durationSelector = (Expression <Func <TPartitionKey, long, long, long> >)stream.DurationSelector; this.startTimeSelector = (Expression <Func <TPartitionKey, long, long> >)stream.StartTimeSelector; this.pool = MemoryManager.GetMemoryPool <PartitionKey <TPartitionKey>, TPayload>(stream.Properties.IsColumnar); if (this.startTimeSelector != null) { this.startTimeSelectorCompiled = this.startTimeSelector.Compile(); } this.durationSelectorCompiled = this.durationSelector.Compile(); }