From d0e364ddb4dff1c314cb746314d18773ec6ba133 Mon Sep 17 00:00:00 2001 From: hubera01 Date: Fri, 22 Apr 2016 15:31:52 +0200 Subject: [PATCH] Replace the word "query" with the more appropriate "retrieve" in various locations. References #21 --- Lawo.EmberPlusSharp/Model/Consumer.cs | 19 ++++++++++--------- .../Model/ElementWithSchemas.cs | 4 ++-- .../DynamicInterface/LocalCopy.aml | 6 +++--- .../DynamicInterface/ReactToChanges.aml | 2 +- .../StaticInterface/StaticInterface.aml | 4 ++-- .../Content/Library/Rationale/Rationale.aml | 2 +- Lawo.EmberPlusSharpTest/Model/TutorialTest.cs | 2 +- .../Model/TutorialTest.vb | 2 +- 8 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Lawo.EmberPlusSharp/Model/Consumer.cs b/Lawo.EmberPlusSharp/Model/Consumer.cs index 91e1c002..46519b64 100644 --- a/Lawo.EmberPlusSharp/Model/Consumer.cs +++ b/Lawo.EmberPlusSharp/Model/Consumer.cs @@ -35,7 +35,7 @@ public sealed class Consumer : IMonitoredConnection private readonly StreamedParameterCollection streamedParameters = new StreamedParameterCollection(); private readonly TRoot root; private readonly S101Client client; - private readonly int queryChildrenTimeout; + private readonly int childrenRetrievalTimeout; private readonly S101Message emberDataMessage; private int autoSendInterval = 100; private CancellationTokenSource autoSendDelayCancellationSource; @@ -201,7 +201,7 @@ public static async Task> CreateAsync( S101Client client, int timeout, ChildrenRequestPolicy childrenRequestPolicy, byte slot) { var result = new Consumer(client, timeout, childrenRequestPolicy, slot); - await result.QueryChildrenAsync(); + await result.RetrieveChildrenAsync(); result.ReceiveLoop(); result.AutoSendLoop(); return result; @@ -227,7 +227,7 @@ private Consumer(S101Client client, int timeout, ChildrenRequestPolicy childrenR { this.root = Root.Construct(new Context(null, 0, string.Empty, childrenRequestPolicy)); this.client = client; - this.queryChildrenTimeout = timeout; + this.childrenRetrievalTimeout = timeout; this.emberDataMessage = new S101Message(slot, EmberDataCommand); this.client.EmberDataReceived += this.receiveQueue.OnMessageReceived; this.client.ConnectionLost += this.receiveQueue.OnConnectionLost; @@ -246,11 +246,12 @@ private void OnHasChangesSet(object sender, EventArgs e) this.hasChangesSetSource.TrySetResult(true); } - private async Task QueryChildrenAsync() + private async Task RetrieveChildrenAsync() { - var queryChildrenTask = this.QueryChildrenCoreAsync(); + var retrieveChildrenTask = this.RetrieveChildrenCoreAsync(); - if ((await Task.WhenAny(queryChildrenTask, Task.Delay(this.queryChildrenTimeout))) != queryChildrenTask) + if ((await Task.WhenAny(retrieveChildrenTask, Task.Delay(this.childrenRetrievalTimeout))) != + retrieveChildrenTask) { this.root.UpdateRequestState(this.root.RequestState.Equals(RequestState.Complete)); var firstIncompleteNode = this.root.GetFirstIncompleteChild(); @@ -261,7 +262,7 @@ private async Task QueryChildrenAsync() throw new TimeoutException(message); } - await queryChildrenTask; + await retrieveChildrenTask; } private async void ReceiveLoop() @@ -273,7 +274,7 @@ private async void ReceiveLoop() while (true) { await this.WaitForAndApplyChanges(); - await this.QueryChildrenAsync(); + await this.RetrieveChildrenAsync(); } } catch (OperationCanceledException) @@ -323,7 +324,7 @@ private async void AutoSendLoop() } } - private async Task QueryChildrenCoreAsync() + private async Task RetrieveChildrenCoreAsync() { while (await this.SendRequestAsync()) { diff --git a/Lawo.EmberPlusSharp/Model/ElementWithSchemas.cs b/Lawo.EmberPlusSharp/Model/ElementWithSchemas.cs index 90f961bf..7b2bc5b0 100644 --- a/Lawo.EmberPlusSharp/Model/ElementWithSchemas.cs +++ b/Lawo.EmberPlusSharp/Model/ElementWithSchemas.cs @@ -30,9 +30,9 @@ public abstract class ElementWithSchemas : Element, /// /// /// See individual method documentation for semantics. This rather complex system was implemented to make the - /// process of querying the provider as efficient as possible, namely: + /// process of retrieving elements from the provider as efficient as possible, namely: /// - /// As few as possible messages are sent to query for children and/or subscribe to streams. + /// As few as possible messages are sent to request children and/or subscribe to streams. /// The computational effort for tree traversal is kept as low as possible. This is necessary because all /// code is always executed on the applications GUI thread. Without these optimizations, a full tree traversal /// would be necessary after each processed message. Some providers send a new message for each updated diff --git a/Lawo.EmberPlusSharpDoc/Content/Library/ModelNamespace/DynamicInterface/LocalCopy.aml b/Lawo.EmberPlusSharpDoc/Content/Library/ModelNamespace/DynamicInterface/LocalCopy.aml index 5819fe57..7a0d6e32 100644 --- a/Lawo.EmberPlusSharpDoc/Content/Library/ModelNamespace/DynamicInterface/LocalCopy.aml +++ b/Lawo.EmberPlusSharpDoc/Content/Library/ModelNamespace/DynamicInterface/LocalCopy.aml @@ -47,9 +47,9 @@ TCP Connection and S101 - Before we can query the provider we first need to create a connection and then establish the S101 protocol. - Since these first steps will be mostly the same whenever we'd like to connect to a provider, we'll put them - into a handy method: + Before we can retrieve data from the provider we first need to create a connection and then establish the S101 + protocol. Since these first steps will be mostly the same whenever we'd like to connect to a provider, we'll + put them into a handy method: diff --git a/Lawo.EmberPlusSharpDoc/Content/Library/ModelNamespace/DynamicInterface/ReactToChanges.aml b/Lawo.EmberPlusSharpDoc/Content/Library/ModelNamespace/DynamicInterface/ReactToChanges.aml index 3d4d9984..b2b49e4d 100644 --- a/Lawo.EmberPlusSharpDoc/Content/Library/ModelNamespace/DynamicInterface/ReactToChanges.aml +++ b/Lawo.EmberPlusSharpDoc/Content/Library/ModelNamespace/DynamicInterface/ReactToChanges.aml @@ -74,7 +74,7 @@ Throughout its lifetime, a consumer automatically sends getDirectory commands to - query for children client code has declared interest in. This is done recursively down to leaf elements and + retrieve children client code has declared interest in. This is done recursively down to leaf elements and new nodes are only announced through T:System.Collections.Specialized.INotifyCollectionChanged once all children (including grandchildren, great-grandchildren, etc.) have been received from the provider. diff --git a/Lawo.EmberPlusSharpDoc/Content/Library/ModelNamespace/StaticInterface/StaticInterface.aml b/Lawo.EmberPlusSharpDoc/Content/Library/ModelNamespace/StaticInterface/StaticInterface.aml index dbd7141a..3c14b64d 100644 --- a/Lawo.EmberPlusSharpDoc/Content/Library/ModelNamespace/StaticInterface/StaticInterface.aml +++ b/Lawo.EmberPlusSharpDoc/Content/Library/ModelNamespace/StaticInterface/StaticInterface.aml @@ -12,8 +12,8 @@ databases of unknown contents. - The main difference between the dynamic and the static interface is that the former will query the provider for - all elements and replicate them in the local database while the latter will only query and replicate the + The main difference between the dynamic and the static interface is that the former will retrieve all elements + from the provider and replicate them in the local database while the latter will only retrieve and replicate the elements that the client code is interested in. Apart from that the static interface offers a superset of the functionality of the dynamic one. diff --git a/Lawo.EmberPlusSharpDoc/Content/Library/Rationale/Rationale.aml b/Lawo.EmberPlusSharpDoc/Content/Library/Rationale/Rationale.aml index 2c6cad1e..8de89af5 100644 --- a/Lawo.EmberPlusSharpDoc/Content/Library/Rationale/Rationale.aml +++ b/Lawo.EmberPlusSharpDoc/Content/Library/Rationale/Rationale.aml @@ -35,7 +35,7 @@ - Recursively query the provider for the parts of the tree the consumer is interested in. + Recursively retrieve from the provider the parts of the tree the consumer is interested in. diff --git a/Lawo.EmberPlusSharpTest/Model/TutorialTest.cs b/Lawo.EmberPlusSharpTest/Model/TutorialTest.cs index c78954c1..9f6cee10 100644 --- a/Lawo.EmberPlusSharpTest/Model/TutorialTest.cs +++ b/Lawo.EmberPlusSharpTest/Model/TutorialTest.cs @@ -277,7 +277,7 @@ private static void Main() // Establish S101 protocol using (S101Client client = await ConnectAsync("localhost", 9000)) - // Query the provider database for *all* elements and store them in a local copy + // Retrieve *all* elements in the provider database and store them in a local copy using (Consumer consumer = await Consumer.CreateAsync(client)) { // Get the root of the local database. diff --git a/Lawo.EmberPlusSharpTestVB/Model/TutorialTest.vb b/Lawo.EmberPlusSharpTestVB/Model/TutorialTest.vb index 3a2649be..9a45b132 100644 --- a/Lawo.EmberPlusSharpTestVB/Model/TutorialTest.vb +++ b/Lawo.EmberPlusSharpTestVB/Model/TutorialTest.vb @@ -208,7 +208,7 @@ Public Class TutorialTestVB Async Function() ' Establish S101 protocol Using client As S101Client = Await ConnectAsync("localhost", 9000) - ' Query the provider database for *all* elements and store them in a local copy + ' Retrieve *all* elements in the provider database and store them in a local copy Using con As Consumer(Of MyRoot) = Await Consumer(Of MyRoot).CreateAsync(client) ' Get the root of the local database. Dim root As INode = con.Root