Package net.sf.katta.util

Examples of net.sf.katta.util.ClientConfiguration


  @Override
  protected void afterClusterStart() throws Exception {
    IDeployClient deployClient = new DeployClient(_miniCluster.getProtocol());
    deployClient.addIndex(INDEX1, TestResources.MAP_FILE_A.getAbsolutePath(), 1).joinDeployment();
    _client = new SleepClient(new DefaultNodeSelectionPolicy(), _miniCluster.getZkConfiguration(),
            new ClientConfiguration());
  }
View Full Code Here


  public Client(Class<? extends VersionedProtocol> serverClass, final ZkConfiguration config) {
    this(serverClass, new DefaultNodeSelectionPolicy(), config);
  }

  public Client(Class<? extends VersionedProtocol> serverClass, InteractionProtocol protocol) {
    this(serverClass, new DefaultNodeSelectionPolicy(), protocol, new ClientConfiguration());
  }
View Full Code Here

    this(serverClass, nodeSelectionPolicy, new ZkConfiguration());
  }

  public Client(Class<? extends VersionedProtocol> serverClass, final INodeSelectionPolicy policy,
          final ZkConfiguration zkConfig) {
    this(serverClass, policy, zkConfig, new ClientConfiguration());
  }
View Full Code Here

  @Test
  public void testAddRemoveIndexForSearching() throws Exception {
    InteractionProtocol protocol = mock(InteractionProtocol.class);
    Client client = new Client(ISleepServer.class, new DefaultNodeSelectionPolicy(), protocol,
            new ClientConfiguration());
    IndexMetaData indexMD = new IndexMetaData("index1", "path", 1);
    indexMD.getShards().add(new Shard("shard1", "path"));
    indexMD.getShards().add(new Shard("shard2", "path"));
    client.addIndexForSearching(indexMD);
    verify(protocol, times(2)).registerChildListener(eq(client), eq(PathDef.SHARD_TO_NODES), anyString(),
View Full Code Here

  @Test
  public void testAddRemoveIndexForWatching() throws Exception {
    InteractionProtocol protocol = mock(InteractionProtocol.class);
    Client client = new Client(ISleepServer.class, new DefaultNodeSelectionPolicy(), protocol,
            new ClientConfiguration());
    IndexMetaData indexMD = new IndexMetaData("index1", "path", 1);
    indexMD.getShards().add(new Shard("shard1", "path"));
    indexMD.getShards().add(new Shard("shard2", "path"));
    client.addIndexForWatching(indexMD.getName());
    verify(protocol, times(1)).registerDataListener(eq(client), eq(PathDef.INDICES_METADATA), anyString(),
View Full Code Here

  @Test
  public void testClose() throws Exception {
    InteractionProtocol protocol = mock(InteractionProtocol.class);
    Client client = new Client(ISleepServer.class, new DefaultNodeSelectionPolicy(), protocol,
            new ClientConfiguration());
    client.close();

    verify(protocol).unregisterComponent(client);
    verify(protocol).disconnect();
  }
View Full Code Here

TOP

Related Classes of net.sf.katta.util.ClientConfiguration

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.