Examples of InetSocketAddressWrapper


Examples of net.rubyeye.xmemcached.utils.InetSocketAddressWrapper

      throws IOException {
    if (weight <= 0) {
      throw new IllegalArgumentException("weight<=0");
    }
    this.checkServerPort(server, port);
    this.connect(new InetSocketAddressWrapper(this.newSocketAddress(server,
        port), this.serverOrderCount.incrementAndGet(), weight, null));
  }
View Full Code Here

Examples of net.rubyeye.xmemcached.utils.InetSocketAddressWrapper

      throw new IllegalArgumentException("Null InetSocketAddress");
    }
    if (weight <= 0) {
      throw new IllegalArgumentException("weight<=0");
    }
    this.connect(new InetSocketAddressWrapper(inetSocketAddress,
        this.serverOrderCount.incrementAndGet(), weight, null));
  }
View Full Code Here

Examples of net.rubyeye.xmemcached.utils.InetSocketAddressWrapper

    if (addresses != null && addresses.size() > 0) {
      for (Map.Entry<InetSocketAddress, InetSocketAddress> entry : addresses
          .entrySet()) {
        final InetSocketAddress mainNodeAddr = entry.getKey();
        final InetSocketAddress standbyNodeAddr = entry.getValue();
        this.connect(new InetSocketAddressWrapper(mainNodeAddr,
            this.serverOrderCount.incrementAndGet(), 1, null));
        if (standbyNodeAddr != null) {
          this.connect(new InetSocketAddressWrapper(standbyNodeAddr,
              this.serverOrderCount.incrementAndGet(), 1,
              mainNodeAddr));
        }
      }
    }
View Full Code Here

Examples of net.rubyeye.xmemcached.utils.InetSocketAddressWrapper

    if (addresses != null && addresses.size() > 0) {
      for (Map.Entry<InetSocketAddress, InetSocketAddress> entry : addresses
          .entrySet()) {
        final InetSocketAddress mainNodeAddr = entry.getKey();
        final InetSocketAddress standbyNodeAddr = entry.getValue();
        this.connect(new InetSocketAddressWrapper(mainNodeAddr,
            this.serverOrderCount.incrementAndGet(), 1, null));
        if (standbyNodeAddr != null) {
          this.connect(new InetSocketAddressWrapper(standbyNodeAddr,
              this.serverOrderCount.incrementAndGet(), 1,
              mainNodeAddr));
        }
      }
    }
View Full Code Here

Examples of net.rubyeye.xmemcached.utils.InetSocketAddressWrapper

        new SimpleBufferAllocator(), XMemcachedClientBuilder
            .getDefaultConfiguration(), XMemcachedClientBuilder
            .getDefaultSocketOptions(), new TextCommandFactory(),
        new SerializingTranscoder());
    this.start0();
    this.connect(new InetSocketAddressWrapper(inetSocketAddress,
        this.serverOrderCount.incrementAndGet(), weight, null));
  }
View Full Code Here

Examples of net.rubyeye.xmemcached.utils.InetSocketAddressWrapper

    if (addressMap != null) {
      for (Map.Entry<InetSocketAddress, InetSocketAddress> entry : addressMap
          .entrySet()) {
        final InetSocketAddress mainNodeAddr = entry.getKey();
        final InetSocketAddress standbyNodeAddr = entry.getValue();
        this.connect(new InetSocketAddressWrapper(mainNodeAddr,
            this.serverOrderCount.incrementAndGet(), 1, null));
        if (standbyNodeAddr != null) {
          this.connect(new InetSocketAddressWrapper(standbyNodeAddr,
              this.serverOrderCount.incrementAndGet(), 1,
              mainNodeAddr));
        }
      }
    }
View Full Code Here

Examples of net.rubyeye.xmemcached.utils.InetSocketAddressWrapper

      int i = 0;
      for (Map.Entry<InetSocketAddress, InetSocketAddress> entry : addressMap
          .entrySet()) {
        final InetSocketAddress mainNodeAddr = entry.getKey();
        final InetSocketAddress standbyNodeAddr = entry.getValue();
        this.connect(new InetSocketAddressWrapper(mainNodeAddr,
            this.serverOrderCount.incrementAndGet(), weights[i],
            null));
        if (standbyNodeAddr != null) {
          this.connect(new InetSocketAddressWrapper(standbyNodeAddr,
              this.serverOrderCount.incrementAndGet(),
              weights[i], mainNodeAddr));
        }
        i++;
      }
View Full Code Here

Examples of net.rubyeye.xmemcached.utils.InetSocketAddressWrapper

            .getDefaultConfiguration(), XMemcachedClientBuilder
            .getDefaultSocketOptions(), new TextCommandFactory(),
        new SerializingTranscoder());
    this.start0();
    for (InetSocketAddress inetSocketAddress : addressList) {
      this.connect(new InetSocketAddressWrapper(inetSocketAddress,
          this.serverOrderCount.incrementAndGet(), 1, null));

    }
  }
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();

    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
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.