@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()); }
public static MemcachedClient create(final PippoSettings settings) { String host = settings.getString(HOST, "localhost:11211"); String prot = settings.getString(PROT, "BINARY"); CommandFactory protocol; switch (prot) { case "BINARY": protocol = new BinaryCommandFactory(); break; case "TEXT": protocol = new TextCommandFactory(); break; default: protocol = new BinaryCommandFactory(); break; } String user = settings.getString(USER, ""); String pass = settings.getString(PASS, ""); List<String> autM = settings.getStrings(AUTM); String[] mechanisms = autM.toArray(new String[autM.size()]); return create(host, protocol, user, pass, mechanisms); }
XmemcachedFactory { public static MemcachedClient create(final PippoSettings settings) { String host = settings.getString(HOST, "localhost:11211"); String prot = settings.getString(PROT, "BINARY"); CommandFactory protocol; switch (prot) { case "BINARY": protocol = new BinaryCommandFactory(); break; case "TEXT": protocol = new TextCommandFactory(); break; default: protocol = new BinaryCommandFactory(); break; } String user = settings.getString(USER, ""); String pass = settings.getString(PASS, ""); List<String> autM = settings.getStrings(AUTM); String[] mechanisms = autM.toArray(new String[autM.size()]); return create(host, protocol, user, pass, mechanisms); } }
XmemcachedFactory { public static MemcachedClient create(final PippoSettings settings) { String host = settings.getString(HOST, "localhost:11211"); String prot = settings.getString(PROT, "BINARY"); CommandFactory protocol; switch (prot) { case "BINARY": protocol = new BinaryCommandFactory(); break; case "TEXT": protocol = new TextCommandFactory(); break; default: protocol = new BinaryCommandFactory(); break; } String user = settings.getString(USER, ""); String pass = settings.getString(PASS, ""); List<String> autM = settings.getStrings(AUTM); String[] mechanisms = autM.toArray(new String[autM.size()]); return create(host, protocol, user, pass, mechanisms); } private  XmemcachedFactory(); }
XmemcachedFactory { public static MemcachedClient create(final PippoSettings settings) { String host = settings.getString(HOST, "localhost:11211"); String prot = settings.getString(PROT, "BINARY"); CommandFactory protocol; switch (prot) { case "BINARY": protocol = new BinaryCommandFactory(); break; case "TEXT": protocol = new TextCommandFactory(); break; default: protocol = new BinaryCommandFactory(); break; } String user = settings.getString(USER, ""); String pass = settings.getString(PASS, ""); List<String> autM = settings.getStrings(AUTM); String[] mechanisms = autM.toArray(new String[autM.size()]); return create(host, protocol, user, pass, mechanisms); } private  XmemcachedFactory(); static MemcachedClient create(final PippoSettings settings); static MemcachedClient create(
            String hosts,
            CommandFactory protocol,
            String user,
            String pass,
            String[] authMechanisms); }
XmemcachedFactory { public static MemcachedClient create(final PippoSettings settings) { String host = settings.getString(HOST, "localhost:11211"); String prot = settings.getString(PROT, "BINARY"); CommandFactory protocol; switch (prot) { case "BINARY": protocol = new BinaryCommandFactory(); break; case "TEXT": protocol = new TextCommandFactory(); break; default: protocol = new BinaryCommandFactory(); break; } String user = settings.getString(USER, ""); String pass = settings.getString(PASS, ""); List<String> autM = settings.getStrings(AUTM); String[] mechanisms = autM.toArray(new String[autM.size()]); return create(host, protocol, user, pass, mechanisms); } private  XmemcachedFactory(); static MemcachedClient create(final PippoSettings settings); static MemcachedClient create(
            String hosts,
            CommandFactory protocol,
            String user,
            String pass,
            String[] authMechanisms);  }