Package net.rubyeye.xmemcached

Examples of net.rubyeye.xmemcached.MemcachedClient.shutdown()


    // confirm
    Assert.assertNull(newClient.get("queue1/close"));
    // null
    Assert.assertNull(newClient.get("queue1"));

    newClient.shutdown();
  }

  public void testPerformance() throws Exception {
    long start = System.currentTimeMillis();
    for (int i = 0; i < 10000; i++) {
View Full Code Here


      Thread.sleep(5000);
      assertEquals("response from server1", client.get("a"));
    } finally {
      memServer1.stop();
      memServer2.stop();
      client.shutdown();
    }

  }

  @Test
View Full Code Here

      assertEquals("response from server1", client.get("b"));
    } finally {
      if (memServer1 != null)
        memServer1.stop();
      memServer2.stop();
      client.shutdown();
    }

  }

  @Test
View Full Code Here

      assertEquals("response from server1", client.get("a"));

    } finally {
      memServer1.stop();
      memServer2.stop();
      client.shutdown();
    }

  }

  @Test
View Full Code Here

            .getMessage());
        assertTrue(true);
      }
    } finally {
      memServer1.stop();
      client.shutdown();
    }

  }

  @Test
View Full Code Here

        assertTrue(true);
      }
    } finally {
      memServer1.stop();
      memServer2.stop();
      client.shutdown();
    }

  }

  @Test
View Full Code Here

            e.getMessage());
        assertTrue(true);
      }
    } finally {
      memServer1.stop();
      client.shutdown();
    }

  }

  @Test
View Full Code Here

      Thread.sleep(1000);
      assertEquals("response from server1", client.get("a"));
    } finally {
      memServer1.stop();
      memServer2.stop();
      client.shutdown();
    }

  }

}
View Full Code Here

  }

  public void testCreateClientWithEmptyServers() throws Exception {
    MemcachedClient client = new XMemcachedClient();
    assertFalse(client.isShutdown());
    client.shutdown();
    assertTrue(client.isShutdown());

    MemcachedClientBuilder builder = new XMemcachedClientBuilder();
    client = builder.build();
    assertFalse(client.isShutdown());
View Full Code Here

    assertTrue(client.isShutdown());

    MemcachedClientBuilder builder = new XMemcachedClientBuilder();
    client = builder.build();
    assertFalse(client.isShutdown());
    client.shutdown();
    assertTrue(client.isShutdown());
  }

  protected void createClients() throws IOException, Exception,
      TimeoutException, InterruptedException, MemcachedException {
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.