Examples of ServerAddress


Examples of com.mongodb.ServerAddress

            if (node.isConfig) {
                ((Menu)getBoundUnit(Item.replica)).enabled = false;
            }
           
            MongoClient svrMongo = node.getServerMongoClient();
            ServerAddress addr = getServerNode().getServerAddress();
            if (addr != null) {
                setStringFieldValue(Item.host, addr.toString());
                setStringFieldValue(Item.address, addr.getSocketAddress().toString());
            }

            CommandResult res = svrMongo.getDB("local").command("isMaster");
            boolean master = res.getBoolean("ismaster");
            String replication = MongoUtils.makeInfoString("master", master,
View Full Code Here

Examples of com.mongodb.ServerAddress

    }

    @Override
    protected void updateComponentCustom(JPanel comp) {
        try {
            ServerAddress addr = getRouterNode().getAddress();
            setStringFieldValue(Item.host, addr.getHost() + ":" + addr.getPort());
            setStringFieldValue(Item.address, addr.getSocketAddress().toString());
            ((DocField) getBoundUnit(Item.shards)).setDoc(((RouterNode)node).shards);
        } catch (Exception e) {
            UMongo.instance.showError(this.getClass().getSimpleName() + " update", e);
        }
    }
View Full Code Here

Examples of com.mongodb.ServerAddress

            server = tokens[0];
            String shard = tokens[1];
            if (primaryShard == null) {
                primaryShard = shard;
            }
            ServerAddress addr = new ServerAddress(server);

            // filter out if replset already exists
            for (MongoClient replset : mongoToShard.keySet()) {
                if (replset.getServerAddressList().contains(addr)) {
                    continue sLoop;
View Full Code Here

Examples of org.apache.accumulo.server.util.TServerUtils.ServerAddress

  }

  private HostAndPort startServer(AccumuloConfiguration conf, String address, Property portHint, TProcessor processor, String threadName)
      throws UnknownHostException {
    Property maxMessageSizeProperty = (conf.get(Property.TSERV_MAX_MESSAGE_SIZE) != null ? Property.TSERV_MAX_MESSAGE_SIZE : Property.GENERAL_MAX_MESSAGE_SIZE);
    ServerAddress sp = TServerUtils.startServer(conf, address, portHint, processor, this.getClass().getSimpleName(), threadName, Property.TSERV_PORTSEARCH,
        Property.TSERV_MINTHREADS, Property.TSERV_THREADCHECK, maxMessageSizeProperty);
    this.server = sp.server;
    return sp.address;
  }
View Full Code Here

Examples of org.apache.accumulo.server.util.TServerUtils.ServerAddress

    } catch (InterruptedException e) {
      throw new IOException(e);
    }

    Processor<Iface> processor = new Processor<Iface>(RpcWrapper.service(new MasterClientServiceHandler(this)));
    ServerAddress sa = TServerUtils.startServer(getSystemConfiguration(), hostname, Property.MASTER_CLIENTPORT, processor, "Master",
        "Master Client Service Handler", null, Property.MASTER_MINTHREADS, Property.MASTER_THREADCHECK, Property.GENERAL_MAX_MESSAGE_SIZE);
    clientService = sa.server;
    String address = sa.address.toString();
    log.info("Setting master lock data to " + address);
    masterLock.replaceLockData(address.getBytes());
View Full Code Here

Examples of org.jboss.invocation.pooled.interfaces.ServerAddress

    * @throws Exception
    */
   public void testServerAddressHashEquals()
      throws Exception
   {
      ServerAddress sa1 = new ServerAddress("127.0.0.1", 4445, false, 60, null);
      ServerAddress sa2 = new ServerAddress("127.0.0.1", 4445, false, 61, null);
      assertEquals(sa1, sa2);
      assertEquals(sa1.hashCode(), sa2.hashCode());

      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(baos);
      oos.writeObject(sa1);
      ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
      ObjectInputStream ois = new ObjectInputStream(bais);
      sa2 = (ServerAddress) ois.readObject();
      assertEquals(sa1, sa2);
      assertEquals(sa1.hashCode(), sa2.hashCode());

      // Different tcpNoDelay should not be equal
      sa2 = new ServerAddress("127.0.0.1", 4445, true, 61, null);
      assertNotSame(sa1, sa2);
      // Different ports should not be equal
      sa2 = new ServerAddress("127.0.0.1", 4446, false, 60, null);
      assertNotSame(sa1, sa2);
      // Different host should not be equal
      sa2 = new ServerAddress("127.0.0.2", 4445, false, 60, null);
      assertNotSame(sa1, sa2);
   }
View Full Code Here

Examples of org.jboss.remoting.transport.socket.ServerAddress

   // Public ---------------------------------------------------------------------------------------

   public void testEquals() throws Throwable
   {
      ServerAddress sa = new ServerAddress("127.0.0.1", 5678, false, 0);
      ServerAddress sa2 = new ServerAddress("127.0.0.1", 5678, false, 1);

      assertFalse(sa.equals(sa2));
   }
View Full Code Here

Examples of org.jboss.remoting.transport.socket.ServerAddress

      client.connect();
      log.info("client is connected");
      Method getServerAddress = getClientInvokerClass().getMethod("getServerAddress", new Class[]{});
      getServerAddress.setAccessible(true);
      ClientInvoker clientInvoker = client.getInvoker();
      ServerAddress address = (ServerAddress) getServerAddress.invoke(clientInvoker, new Object[]{});
      log.info("timeout in use: " + address.timeout);
      assertEquals(SocketClientInvoker.SO_TIMEOUT_DEFAULT, address.timeout);
     
      client.disconnect();
      shutdownServer();
View Full Code Here

Examples of org.jitterbit.integration.client.server.ServerAddress

        }
    }
   
    private void loginWithCredentials(LoginCredentials credentials, LoginCallback externalCallback) {
        try {
            ServerAddress address = credentials.getServerAddress();
            serverManager.getLoginService().getConfiguration().setServerName(address.toString());
        } catch (IllegalServerAddressException ex) {
            externalCallback.caught(ex);
            return;
        }
        UiJob job = new LoginJob(credentials, externalCallback);
View Full Code Here

Examples of org.wymiwyg.commons.util.http.ServerAddress

      loadCache();
      // return;
    }
    String serverName;
    String hostHeader = request.getHeaderValues(HeaderName.HOST)[0];
    ServerAddress requested = new ServerAddress(request.getScheme().getStringRepresentation()+"://"+hostHeader);
    if (log.isDebugEnabled()) {
      log.debug("Request ServerAddress: " + requested);
    }
    ServerAddress canonicalAddress = (ServerAddress) hostReplacement
        .get(requested);
    if (canonicalAddress != null) {
      if (!requested.equals(canonicalAddress)) {
        sendRedirect(canonicalAddress, request, response);
        return;
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.