Package com.netflix.staash.mesh.client

Examples of com.netflix.staash.mesh.client.Client


     * Remove a peer that is no longer in the ring.
     * @param instanceInfo
     */
    private void removePeer(InstanceInfo instanceInfo) {
        System.out.println("Removing peer " + this.instanceInfo + " -> " + instanceInfo);
        Client client = peers.remove(instanceInfo);
        client.shutdown();
    }
View Full Code Here


     * Add a new peer connection
     * @param instanceInfo
     */
    private void addPeer(InstanceInfo instanceInfo) {
//        System.out.println("Adding peer " + this.instanceInfo + " -> " + instanceInfo);
        Client client = clientFactory.createClient(instanceInfo);
        peers.put(instanceInfo, client);
        boostrapClient(client);
    }
View Full Code Here

     * Disconnect a peer that is no longer in our path
     * @param instanceInfo
     */
    private void disconnectPeer(InstanceInfo instanceInfo) {
        System.out.println("Disconnect peer " + this.instanceInfo + " -> " + instanceInfo);
        Client client = peers.remove(instanceInfo);
        if (client != null) {
            client.shutdown();
        }
        else {
            System.out.println(instanceInfo + " > " + peers);
        }
    }
View Full Code Here

TOP

Related Classes of com.netflix.staash.mesh.client.Client

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.