Java Code Examples for net.rubyeye.xmemcached.MemcachedClient#shutdown()

The following examples show how to use net.rubyeye.xmemcached.MemcachedClient#shutdown() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XmemcachedFactoryTest.java    From pippo with Apache License 2.0 5 votes vote down vote up
/**
 * Test of create method, of class SpymemcachedUtil.
 */
@Test
public void testCreate_PippoSettings() throws IOException {
    System.out.println("create");
    MemcachedClient result = XmemcachedFactory.create(application.getPippoSettings());
    assertNotNull(result);
    assertFalse(result.isShutdown());
    result.shutdown();
    assertTrue(result.isShutdown());
}
 
Example 2
Source File: XmemcachedFactoryTest.java    From pippo with Apache License 2.0 5 votes vote down vote up
/**
 * Test of create method, of class SpymemcachedUtil.
 */
@Test
public void testCreate_5args() throws IOException {
    System.out.println("create");
    CommandFactory protocol = new BinaryCommandFactory();
    String user = "";
    String pass = "";
    String[] authMechanisms = new String[]{"PLAIN"};
    MemcachedClient result = XmemcachedFactory.create(HOST, protocol, user, pass, authMechanisms);
    assertNotNull(result);
    assertFalse(result.isShutdown());
    result.shutdown();
    assertTrue(result.isShutdown());
}