Esempio n. 1
0
 /// <summary>
 /// 操作数据
 /// </summary>
 /// <param name="node"></param>
 /// <param name="onReturn"></param>
 internal override void OperationStream(DataStructure.Abstract.Node node, Action <AutoCSer.Net.TcpServer.ReturnValue <ReturnParameter> > onReturn)
 {
     onReturn(new Net.TcpServer.ReturnValue <ReturnParameter> {
         Type = AutoCSer.Net.TcpServer.ReturnType.ClientException, Value = new ReturnParameter {
             Type = ReturnType.SlaveCanNotWrite
         }
     });
 }
Esempio n. 2
0
 /// <summary>
 /// 数据结构定义信息
 /// </summary>
 /// <param name="client">客户端</param>
 /// <param name="cacheName">缓存名称标识</param>
 /// <param name="nodeType">数据结构定义节点类型</param>
 /// <param name="node">数据结构定义节点</param>
 internal ClientDataStructure(Client client, string cacheName, Type nodeType, DataStructure.Abstract.Node node)
 {
     Client    = client;
     CacheName = cacheName;
     NodeType  = nodeType;
     Node      = node;
     if ((valueNode = node.CreateValueNode()) != null && valueNode is DataStructure.Abstract.IValueNode && Identity.Set(client.GetOrCreate(this)))
     {
         Node.Parameter.Value = this;
     }
 }
Esempio n. 3
0
 internal AutoCSer.Net.TcpServer.AwaiterBox <ReturnParameter> QueryAwaiter(DataStructure.Abstract.Node node)
 {
     if (isMasterClient)
     {
         return(MasterClient.QueryAwaiter(new OperationParameter.QueryNode {
             Node = node
         }));
     }
     return(slaveClient.QueryAwaiter(new OperationParameter.QueryNode {
         Node = node
     }));
 }
Esempio n. 4
0
 /// <summary>
 /// 操作数据
 /// </summary>
 /// <param name="node"></param>
 /// <returns></returns>
 internal override AutoCSer.Net.TcpServer.ReturnValue <ReturnParameter> Operation(DataStructure.Abstract.Node node)
 {
     return(new Net.TcpServer.ReturnValue <ReturnParameter> {
         Type = AutoCSer.Net.TcpServer.ReturnType.ClientException, Value = new ReturnParameter {
             Type = ReturnType.SlaveCanNotWrite
         }
     });
 }
Esempio n. 5
0
 private HashSet(Abstract.Node parent) : base(parent)
 {
 }
Esempio n. 6
0
 private static FragmentDictionary <keyType, nodeType> create(Abstract.Node parent)
 {
     return(new FragmentDictionary <keyType, nodeType>(parent));
 }
Esempio n. 7
0
 private static Array <nodeType> create(Abstract.Node parent)
 {
     return(new Array <nodeType>(parent));
 }
Esempio n. 8
0
 private FragmentHashSet(Abstract.Node parent) : base(parent)
 {
 }
Esempio n. 9
0
 private Lock(Abstract.Node parent) : base(parent)
 {
 }
Esempio n. 10
0
 private static Bitmap create(Abstract.Node parent)
 {
     return(new Bitmap(parent));
 }
Esempio n. 11
0
 private static Link <valueType> create(Abstract.Node parent)
 {
     return(new Link <valueType>(parent));
 }
Esempio n. 12
0
 private Bitmap(Abstract.Node parent) : base(parent)
 {
 }
Esempio n. 13
0
 private static ValueArray <valueType> create(Abstract.Node parent)
 {
     return(new ValueArray <valueType>(parent));
 }
Esempio n. 14
0
 internal AutoCSer.Net.TcpServer.AwaiterBox <ReturnParameter> MasterQueryAsynchronousAwaiter(DataStructure.Abstract.Node node)
 {
     return(MasterClient.QueryAsynchronousAwaiter(new OperationParameter.QueryNode {
         Node = node
     }));
 }
Esempio n. 15
0
 private static ValueFragmentDictionary <keyType, valueType> create(Abstract.Node parent)
 {
     return(new ValueFragmentDictionary <keyType, valueType>(parent));
 }
Esempio n. 16
0
 private static Lock create(Abstract.Node parent)
 {
     return(new Lock(parent));
 }
Esempio n. 17
0
 private FragmentDictionary(Abstract.Node parent) : base(parent)
 {
 }
Esempio n. 18
0
 private FragmentArray(Abstract.Node parent) : base(parent)
 {
 }
Esempio n. 19
0
 private Array(Abstract.Node parent) : base(parent)
 {
 }
Esempio n. 20
0
 private Heap(Abstract.Node parent) : base(parent)
 {
 }
Esempio n. 21
0
 /// <summary>
 /// 查询数据
 /// </summary>
 /// <param name="node"></param>
 /// <returns></returns>
 internal override async Task <AutoCSer.Net.TcpServer.ReturnValue <ReturnParameter> > QueryTask(DataStructure.Abstract.Node node)
 {
     return(await client.QueryAwaiter(new OperationParameter.QueryNode {
         Node = node
     }));
 }
Esempio n. 22
0
 private static Heap <keyType, valueType> create(Abstract.Node parent)
 {
     return(new Heap <keyType, valueType>(parent));
 }
Esempio n. 23
0
 private static HashSet <valueType> create(Abstract.Node parent)
 {
     return(new HashSet <valueType>(parent));
 }
Esempio n. 24
0
 /// <summary>
 /// 操作数据
 /// </summary>
 /// <param name="node"></param>
 internal override void OperationOnly(DataStructure.Abstract.Node node)
 {
     client.OperationOnly(new OperationParameter.OperationNode {
         Node = node
     });
 }
Esempio n. 25
0
 /// <summary>
 /// 查询数据
 /// </summary>
 /// <param name="node"></param>
 /// <param name="onReturn"></param>
 internal override void QueryStream(DataStructure.Abstract.Node node, Action <AutoCSer.Net.TcpServer.ReturnValue <ReturnParameter> > onReturn)
 {
     client.QueryStream(new OperationParameter.QueryNode {
         Node = node
     }, onReturn);
 }
 private static SearchTreeDictionary <keyType, nodeType> create(Abstract.Node parent)
 {
     return(new SearchTreeDictionary <keyType, nodeType>(parent));
 }
Esempio n. 27
0
 /// <summary>
 /// 操作数据
 /// </summary>
 /// <param name="node"></param>
 internal override void OperationOnly(DataStructure.Abstract.Node node)
 {
     throw new InvalidOperationException(ReturnType.SlaveCanNotWrite.ToString());
 }
 private ValueSearchTreeDictionary(Abstract.Node parent) : base(parent)
 {
 }
Esempio n. 29
0
 /// <summary>
 /// 查询数据
 /// </summary>
 /// <param name="node"></param>
 internal override AutoCSer.Net.TcpServer.ReturnValue <ReturnParameter> Query(DataStructure.Abstract.Node node)
 {
     return(client.Query(new OperationParameter.QueryNode {
         Node = node
     }));
 }
Esempio n. 30
0
 internal AutoCSer.Net.TcpServer.AwaiterBox <ReturnParameter> OperationAwaiter(DataStructure.Abstract.Node node)
 {
     return(MasterClient.OperationAwaiter(new OperationParameter.OperationNode {
         Node = node
     }));
 }