Ejemplo n.º 1
0
 /// <summary>
 /// 获取当前读取数据标识
 /// </summary>
 /// <param name="getReadIdentity"></param>
 internal override void GetReadIdentity(QueueTaskThread.GetIdentity getReadIdentity)
 {
     if (Writer != null)
     {
         if (!Writer.IsDisposed)
         {
             int readerIndex = getReadIdentity.ReaderIndex;
             if (readerIndex >= readers.Length)
             {
                 readers = readers.copyNew(Math.Min(Math.Max(readers.Length << 1, readerIndex + 1), (int)ReaderConfig.MaxReaderCount));
             }
             FileReader reader = readers[readerIndex];
             if (reader == null || reader.IsDisposed)
             {
                 reader = new FileReader(this, getReadIdentity.Config, readerIndex);
                 readerDictionary[readerIndex] = reader;
                 readers[readerIndex]          = reader;
             }
             if (!reader.IsDisposed)
             {
                 getReadIdentity.CallOnReturn(reader.Identity);
             }
         }
         else
         {
             getReadIdentity.CallOnReturn(ReturnType.MessageQueueDisposed);
         }
     }
     else
     {
         getReadIdentity.CallOnReturn(ReturnType.MessageQueueNotFoundWriter);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 获取当前读取数据标识
 /// </summary>
 /// <param name="getReadIdentity"></param>
 internal override void GetReadIdentity(QueueTaskThread.GetIdentity getReadIdentity)
 {
     if (Writer != null)
     {
         if (!Writer.IsDisposed)
         {
             if (reader == null || reader.IsDisposed)
             {
                 reader = new FileReader(this, getReadIdentity.Config, 0);
             }
             if (!reader.IsDisposed)
             {
                 getReadIdentity.CallOnReturn(reader.Identity);
             }
         }
         else
         {
             getReadIdentity.CallOnReturn(ReturnType.MessageQueueDisposed);
         }
     }
     else
     {
         getReadIdentity.CallOnReturn(ReturnType.MessageQueueNotFoundWriter);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 获取当前读取数据标识
 /// </summary>
 /// <param name="getReadIdentity"></param>
 internal abstract void GetReadIdentity(QueueTaskThread.GetIdentity getReadIdentity);
Ejemplo n.º 4
0
 /// <summary>
 /// 获取当前读取数据标识
 /// </summary>
 /// <param name="getReadIdentity"></param>
 internal override void GetReadIdentity(QueueTaskThread.GetIdentity getReadIdentity)
 {
     throw new NotImplementedException();
 }