Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring to prepare for async methods #198

Merged
merged 2 commits into from
Jul 14, 2017

Conversation

zhenlineo
Copy link
Contributor

Refactoring to pull RoutingTable and Rediscovery in to RoutingTableManager to simplify the logic in LoadBalancer.

…nager to simplify the logic in LoadBalancer.
Copy link
Contributor

@lutovich lutovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhenlineo changes look good, couple small comments.

// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this licence header needed?

}
}

public class TryAcquireConnectionMethod
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class is probably not needed

}
}
}
var name = mode == AccessMode.Read ? "read" : "wrtie";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mode.ToString().ToLower()? Just to avoid manual string conversion

@@ -32,22 +32,23 @@ internal class RoundRobinRoutingTable : IRoutingTable
private readonly Stopwatch _stopwatch;
private readonly long _expireAfterSeconds;

public RoundRobinRoutingTable(Stopwatch stopwatch, long expireAfterSeconds = 0)
public RoundRobinRoutingTable(IEnumerable<Uri> routers, long expireAfterSeconds = 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This constructor may call the other one using Enumerable.Empty() for readers and writers parameters.

@zhenlineo zhenlineo merged commit 745e22b into neo4j:1.5 Jul 14, 2017
@zhenlineo zhenlineo deleted the 1.5-async-routing-driver branch July 14, 2017 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants