Examples of InetSocketAddressWrapper


Examples of net.rubyeye.xmemcached.utils.InetSocketAddressWrapper

          return;
        }
        session.setAllowReconnect(false);
      }
      MemcachedSession memcachedTCPSession = session;
      InetSocketAddressWrapper inetSocketAddressWrapper = memcachedTCPSession
          .getInetSocketAddressWrapper();
      this.client.getConnector().addToWatingQueue(
          new ReconnectRequest(inetSocketAddressWrapper, 0,
              this.client.getHealSessionInterval()));
    }
View Full Code Here

Examples of net.rubyeye.xmemcached.utils.InetSocketAddressWrapper

  protected final ConcurrentHashMap<InetSocketAddress, Queue<Session>> sessionMap = new ConcurrentHashMap<InetSocketAddress, Queue<Session>>();

  public synchronized void addSession(Session session) {
    MemcachedSession tcpSession = (MemcachedSession) session;

    InetSocketAddressWrapper addrWrapper = tcpSession
        .getInetSocketAddressWrapper();
    // Remember the first time address resolved and use it in all
    // application lifecycle.
    if (addrWrapper.getRemoteAddressStr() == null) {
      addrWrapper.setRemoteAddressStr(String.valueOf(session
          .getRemoteSocketAddress()));
    }

    InetSocketAddress mainNodeAddress = addrWrapper.getMainNodeAddress();
    if (mainNodeAddress != null) {
      // It is a standby session
      this.addStandbySession(session, mainNodeAddress);
    } else {
      // It is a main session
View Full Code Here

Examples of net.rubyeye.xmemcached.utils.InetSocketAddressWrapper

    this.sessionLocator.updateSessions(sessionList);
  }

  public synchronized void removeSession(Session session) {
    MemcachedTCPSession tcpSession = (MemcachedTCPSession) session;
    InetSocketAddressWrapper addrWrapper = tcpSession
        .getInetSocketAddressWrapper();
    InetSocketAddress mainNodeAddr = addrWrapper.getMainNodeAddress();
    if (mainNodeAddr != null) {
      this.removeStandbySession(session, mainNodeAddr);
    } else {
      this.removeMainSession(session);
    }
View Full Code Here

Examples of net.rubyeye.xmemcached.utils.InetSocketAddressWrapper

          return;
        }
        session.setAllowReconnect(false);
      }
      MemcachedSession memcachedTCPSession = session;
      InetSocketAddressWrapper inetSocketAddressWrapper = memcachedTCPSession
          .getInetSocketAddressWrapper();
      this.client.getConnector().addToWatingQueue(
          new ReconnectRequest(inetSocketAddressWrapper, 0,
              this.client.getHealSessionInterval()));
    }
View Full Code Here

Examples of net.rubyeye.xmemcached.utils.InetSocketAddressWrapper

public class MemcachedSessionComparatorUnitTest extends TestCase {
  static private class MockSession implements MemcachedSession, Session {
    private final int order;

    public InetSocketAddressWrapper getInetSocketAddressWrapper() {
      return new InetSocketAddressWrapper(null, this.order, 0, null);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.