public int getOrder() { return this.getInetSocketAddressWrapper().getOrder(); }
public int getWeight() { return this.getInetSocketAddressWrapper().getWeight(); }
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); } }
public final void setServerWeight(String server, int weight) { InetSocketAddress socketAddress = AddrUtil.getOneAddress(server); Queue<Session> sessionQueue = this.connector.getSessionByAddress(socketAddress); if (sessionQueue == null) { throw new IllegalArgumentException("There is no server " + server); } for (Session session : sessionQueue) { if (session != null) { ((MemcachedTCPSession) session).getInetSocketAddressWrapper().setWeight(weight); } } this.connector.updateSessions(); }
public int getOrder() { return this.getInetSocketAddressWrapper().getOrder(); }
public int getWeight() { return this.getInetSocketAddressWrapper().getWeight(); }
public final void setServerWeight(String server, int weight) { InetSocketAddress socketAddress = AddrUtil.getOneAddress(server); Queue<Session> sessionQueue = this.connector.getSessionByAddress(socketAddress); if (sessionQueue == null) { throw new IllegalArgumentException("There is no server " + server); } for (Session session : sessionQueue) { if (session != null) { ((MemcachedTCPSession) session).getInetSocketAddressWrapper().setWeight(weight); } } this.connector.updateSessions(); }
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); } }