Package net.rubyeye.xmemcached

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


  }

  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

    } catch (InterruptedException e) {
      // ignore
    }
    try {
      Thread.sleep(Integer.MAX_VALUE);
      memcachedClient.shutdown();
    } catch (Exception e) {
      System.err.println("Shutdown MemcachedClient fail");
      e.printStackTrace();
    }
  }
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

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.