Package net.sf.katta.node

Examples of net.sf.katta.node.IContentServer


  }

  @Override
  protected void execute(NodeContext context, String shardName, DeployResult deployResult) throws Exception {
    File localShardFolder = context.getShardManager().getShardFolder(shardName);
    IContentServer contentServer = context.getContentServer();
    if (!contentServer.getShards().contains(shardName)) {
      contentServer.addShard(shardName, localShardFolder);
    }
    publishShard(shardName, context);
  }
View Full Code Here


          _nodeSelectionPolicy);

  @Test
  public void testProxyFailure() throws Exception {
    NodeProxyManager proxyManagerSpy = spy(_proxyManager);
    IContentServer contentServer = mock(IContentServer.class);
    doReturn(contentServer).when(proxyManagerSpy).createNodeProxy(anyString());

    assertThat(proxyManagerSpy.getProxy("node1", true)).isNotNull();
    assertThat(proxyManagerSpy.getProxy("node2", true)).isNotNull();
    proxyManagerSpy.setSuccessiveProxyFailuresBeforeReestablishing(2);
View Full Code Here

  }

  @Test
  public void testProxyFailure_ConnectionFailure() throws Exception {
    NodeProxyManager proxyManagerSpy = spy(_proxyManager);
    IContentServer contentServer = mock(IContentServer.class);
    doReturn(contentServer).when(proxyManagerSpy).createNodeProxy(anyString());

    assertThat(proxyManagerSpy.getProxy("node1", true)).isNotNull();
    assertThat(proxyManagerSpy.getProxy("node2", true)).isNotNull();
    proxyManagerSpy.setSuccessiveProxyFailuresBeforeReestablishing(2);
View Full Code Here

  @Override
  protected void execute(NodeContext context, String shardName, DeployResult deployResult) throws Exception {
    String shardPath = getShardPath(shardName);
    File localShardFolder = context.getShardManager().installShard(shardName, shardPath);
    IContentServer contentServer = context.getContentServer();
    if (!contentServer.getShards().contains(shardName)) {
      contentServer.addShard(shardName, localShardFolder);
      Map<String, String> shardMetaData = context.getContentServer().getShardMetaData(shardName);
      if (shardMetaData == null) {
        throw new IllegalStateException("node managed '" + context.getContentServer()
                + "' does return NULL as shard metadata");
      }
View Full Code Here

TOP

Related Classes of net.sf.katta.node.IContentServer

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.