Example #1
0
 PooledByteBuffer(ThreadLocalPool.Handle returnHandle, IByteBufferAllocator allocator, byte[] pooledArray, int maxCapacity)
     : base(allocator, pooledArray, 0, 0, maxCapacity)
 {
     this.length = pooledArray.Length;
     this.returnHandle = returnHandle;
     this.pooledArray = pooledArray;
 }
Example #2
0
 PooledByteBuffer(ThreadLocalPool.Handle returnHandle, IByteBufferAllocator allocator, byte[] pooledArray, int maxCapacity)
     : base(allocator, pooledArray, 0, 0, maxCapacity)
 {
     this.length       = pooledArray.Length;
     this.returnHandle = returnHandle;
     this.pooledArray  = pooledArray;
 }
Example #3
0
 public WriteRequest(ThreadLocalPool.Handle recyclerHandle)
     : base(uv_req_type.UV_WRITE, 0)
 {
     this.recyclerHandle = recyclerHandle;
     this.handles        = new List <GCHandle>();
     this.bufferCount    = 32; // Default to 32 slots
     this.bufs           = new uv_buf_t[this.bufferCount];
     this.bufsPin        = GCHandle.Alloc(this.bufs, GCHandleType.Pinned);
 }
Example #4
0
        public WriteRequest(ThreadLocalPool.Handle recyclerHandle)
            : base(uv_req_type.UV_WRITE, BufferSize * MaximumLimit)
        {
            _recyclerHandle = recyclerHandle;

            int    offset = NativeMethods.GetSize(uv_req_type.UV_WRITE);
            IntPtr addr   = Handle;

            _maxBytes = MaximumBytes;
            _bufs     = addr + offset;
            _pin      = GCHandle.Alloc(addr, GCHandleType.Pinned);
            _handles  = new List <MemoryHandle>(MaximumLimit + 1);
        }
        public WriteRequest(ThreadLocalPool.Handle recyclerHandle)
            : base(uv_req_type.UV_WRITE, BufferSize * MaximumLimit)
        {
            this.recyclerHandle = recyclerHandle;

            int    offset = NativeMethods.GetSize(uv_req_type.UV_WRITE);
            IntPtr addr   = this.Handle;

            this.maxBytes = MaximumBytes;
            this.bufs     = addr + offset;
            this.pin      = GCHandle.Alloc(addr, GCHandleType.Pinned);
            this.handles  = new List <GCHandle>();
        }
Example #6
0
        internal WriteRequest(uv_req_type requestType, ThreadLocalPool.Handle recyclerHandle)
            : base(requestType)
        {
            Debug.Assert(requestType == uv_req_type.UV_WRITE || requestType == uv_req_type.UV_UDP_SEND);

            _requestContext = new RequestContext(requestType, BufferSize * MaximumLimit, this);
            _recyclerHandle = recyclerHandle;
            _handles        = new List <GCHandle>();

            IntPtr addr = _requestContext.Handle;

            _bufs  = addr + _requestContext.HandleSize;
            _pin   = GCHandle.Alloc(addr, GCHandleType.Pinned);
            _count = 0;
        }
 protected AbstractWriteTask(ThreadLocalPool.Handle handle)
     : base(handle)
 {
 }
 public RecyclableObject(ThreadLocalPool.Handle handle)
 {
     this.handle = handle;
 }
Example #9
0
 internal SendRequest(ThreadLocalPool.Handle recyclerHandle)
     : base(uv_req_type.UV_UDP_SEND)
 {
     this.recyclerHandle = recyclerHandle;
 }
Example #10
0
 public PooledByteBuffer(ThreadLocalPool.Handle returnHandle, IByteBufferAllocator allocator, int maxFixedCapacity, int maxCapacity)
     : this(returnHandle, allocator, new byte[maxFixedCapacity], maxCapacity)
 {
 }
Example #11
0
 protected AbstractPooledDerivedByteBuffer(ThreadLocalPool.Handle recyclerHandle)
     : base(0)
 {
     this.recyclerHandle = recyclerHandle;
 }
 Entry(ThreadLocalPool.Handle handle)
 {
     this.handle = handle;
 }
Example #13
0
 private WriteTask(ThreadLocalPool.Handle handle)
 {
     _handle = handle;
 }
Example #14
0
 PendingWrite(ThreadLocalPool.Handle handle)
 {
     this.handle = handle;
 }
Example #15
0
 public RecyclableObject(ThreadLocalPool.Handle handle)
 {
     this.handle = handle;
 }
 PendingWrite(ThreadLocalPool.Handle handle)
 {
     this.Messages = new List <object>();
     this.handle   = handle;
 }
 Entry(ThreadLocalPool.Handle handle)
 {
     _handle = handle;
 }
Example #18
0
 public PooledDuplicatedByteBuffer(ThreadLocalPool.Handle recyclerHandle)
     : base(recyclerHandle)
 {
 }
 protected RecyclableMpscLinkedQueueNode(ThreadLocalPool.Handle handle)
 {
     Contract.Requires(handle != null);
     this.handle = handle;
 }
 internal HandledObject(ThreadLocalPool.Handle handle)
 {
     this.handle = handle;
 }
 WriteTask(ThreadLocalPool.Handle handle)
     : base(handle)
 {
 }
Example #22
0
 PendingWrite(ThreadLocalPool.Handle handle)
 {
     this.handle = handle;
 }
Example #23
0
 PooledSlicedByteBuffer(ThreadLocalPool.Handle handle)
     : base(handle)
 {
 }
Example #24
0
 Entry(ThreadLocalPool.Handle handle)
 {
     this.handle = handle;
 }
Example #25
0
 public Entry(ThreadLocalPool.Handle recyclerHandle)
 {
     _recyclerHandle = recyclerHandle;
 }
Example #26
0
 protected PooledByteBuffer(ThreadLocalPool.Handle recyclerHandle, int maxCapacity)
     : base(maxCapacity)
 {
     this.recyclerHandle = recyclerHandle;
 }
Example #27
0
 internal HandledObject(ThreadLocalPool.Handle handle)
 {
     this.handle = handle;
 }
 protected AbstractWriteTask(ThreadLocalPool.Handle handle)
 {
     this.handle = handle;
 }
Example #29
0
 private Segment(ThreadLocalPool.Handle recyclerHandle)
 {
     this.recyclerHandle = recyclerHandle;
 }
 WriteAndFlushTask(ThreadLocalPool.Handle handle)
     : base(handle)
 {
 }
 internal ArrayPooledUnsafeDirectByteBuffer(ThreadLocalPool.Handle recyclerHandle, int maxCapacity)
     : base(recyclerHandle, maxCapacity)
 {
 }
Example #32
0
 internal PooledArrayBuffer(ThreadLocalPool.Handle recyclerHandle, int capacity)
     : base(capacity)
 {
     this.recyclerHandle = recyclerHandle;
     this.Capacity       = capacity;
 }
Example #33
0
 private WriteTask(ThreadLocalPool.Handle recyclerHandle)
 {
     this.recyclerHandle = recyclerHandle;
 }
Example #34
0
 internal RecyclableQueue(ThreadLocalPool.Handle handle)
 {
     _handle = handle;
 }
Example #35
0
 internal PooledHeapByteBuffer(ThreadLocalPool.Handle recyclerHandle, int maxCapacity)
     : base(recyclerHandle, maxCapacity)
 {
 }