target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void levels() { assertEquals("TRACE", Slf4jLogLevel.toString(LocationAwareLogger.TRACE_INT)); assertEquals("DEBUG", Slf4jLogLevel.toString(LocationAwareLogger.DEBUG_INT)); assertEquals("INFO", Slf4jLogLevel.toString(LocationAwareLogger.INFO_INT)); assertEquals("WARN", Slf4jLogLevel.toString(LocationAwareLo... | public static String toString(int level) { String text = ""; switch (level) { case LocationAwareLogger.TRACE_INT: text = "TRACE"; break; case LocationAwareLogger.DEBUG_INT: text = "DEBUG"; break; case LocationAwareLogger.WARN_INT: text = "WARN"; break; case LocationAwareLogger.ERROR_INT: text = "ERROR"; break; case Loc... | Slf4jLogLevel { public static String toString(int level) { String text = ""; switch (level) { case LocationAwareLogger.TRACE_INT: text = "TRACE"; break; case LocationAwareLogger.DEBUG_INT: text = "DEBUG"; break; case LocationAwareLogger.WARN_INT: text = "WARN"; break; case LocationAwareLogger.ERROR_INT: text = "ERROR";... | Slf4jLogLevel { public static String toString(int level) { String text = ""; switch (level) { case LocationAwareLogger.TRACE_INT: text = "TRACE"; break; case LocationAwareLogger.DEBUG_INT: text = "DEBUG"; break; case LocationAwareLogger.WARN_INT: text = "WARN"; break; case LocationAwareLogger.ERROR_INT: text = "ERROR";... | Slf4jLogLevel { public static String toString(int level) { String text = ""; switch (level) { case LocationAwareLogger.TRACE_INT: text = "TRACE"; break; case LocationAwareLogger.DEBUG_INT: text = "DEBUG"; break; case LocationAwareLogger.WARN_INT: text = "WARN"; break; case LocationAwareLogger.ERROR_INT: text = "ERROR";... | Slf4jLogLevel { public static String toString(int level) { String text = ""; switch (level) { case LocationAwareLogger.TRACE_INT: text = "TRACE"; break; case LocationAwareLogger.DEBUG_INT: text = "DEBUG"; break; case LocationAwareLogger.WARN_INT: text = "WARN"; break; case LocationAwareLogger.ERROR_INT: text = "ERROR";... |
@Test public void shouldNotBlowUpTryingToStartTheServerAgainIfTheSurefireIsRanAgain() { manage(surefire(), lineProcessor); manage(surefire(), lineProcessor); } | public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(); running.set(false... | LineServerManager { public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(... | LineServerManager { public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(... | LineServerManager { public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(... | LineServerManager { public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(... |
@Test public void shouldNotKillTheServerIfTheSurefireIsRanAgain() { manage(surefire(), lineProcessor); manage(surefire(), lineProcessor); assertTrue(canConnectToServer()); } | public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(); running.set(false... | LineServerManager { public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(... | LineServerManager { public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(... | LineServerManager { public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(... | LineServerManager { public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(... |
@Test public void shouldStartTheServerWhenTheSurefirePluginIsAboutToStart() { manage(surefire(), lineProcessor); assertTrue(canConnectToServer()); } | public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(); running.set(false... | LineServerManager { public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(... | LineServerManager { public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(... | LineServerManager { public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(... | LineServerManager { public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(... |
@Test public void shouldNotStartForJustAnyPluginStarting() { manage(plugin("some-other-plugin"), lineProcessor); assertTrue(canNotConnectToServer()); } | public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(); running.set(false... | LineServerManager { public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(... | LineServerManager { public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(... | LineServerManager { public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(... | LineServerManager { public static void manage(String line, final LineListener lineListener) { if (isNotRunningAlready() && isSurefirePluginStarting(line)) { server = new LineServer(PORT); server.addListener(lineListener); server.start(); running.set(true); } else if (isRunning() && isBuildFinished(line)) { server.stop(... |
@Test public void allowEmptyRenderValue() { Config config = config(colorConfig("hello", "")); assertEquals("", filter.filter(context(config, "hello"))); } | @Override public String filter(Context context) { for (LinePatternColoringConfig coloring : context.config.getColoring()) { if (isMatch(context, coloring)) { String result = ansi().render( context.entryText.replaceAll(coloring.getPattern(), coloring.getRender()) ).toString(); if (context.debug) { logDebugInfo(context, ... | ColorLinesMatchingPatternFilter implements LogEntryFilter { @Override public String filter(Context context) { for (LinePatternColoringConfig coloring : context.config.getColoring()) { if (isMatch(context, coloring)) { String result = ansi().render( context.entryText.replaceAll(coloring.getPattern(), coloring.getRender(... | ColorLinesMatchingPatternFilter implements LogEntryFilter { @Override public String filter(Context context) { for (LinePatternColoringConfig coloring : context.config.getColoring()) { if (isMatch(context, coloring)) { String result = ansi().render( context.entryText.replaceAll(coloring.getPattern(), coloring.getRender(... | ColorLinesMatchingPatternFilter implements LogEntryFilter { @Override public String filter(Context context) { for (LinePatternColoringConfig coloring : context.config.getColoring()) { if (isMatch(context, coloring)) { String result = ansi().render( context.entryText.replaceAll(coloring.getPattern(), coloring.getRender(... | ColorLinesMatchingPatternFilter implements LogEntryFilter { @Override public String filter(Context context) { for (LinePatternColoringConfig coloring : context.config.getColoring()) { if (isMatch(context, coloring)) { String result = ansi().render( context.entryText.replaceAll(coloring.getPattern(), coloring.getRender(... |
@Test public void multipleColorConfigs() { Config config = config(colorConfig("hello", "bg_red,fg_white"), colorConfig("world", "@|bg_green,fg_blue $0|@")); String result = filter.filter(context(config, "world")); assertEquals(ansi().bg(GREEN).fg(BLUE).a("world").reset().toString(), result); } | @Override public String filter(Context context) { for (LinePatternColoringConfig coloring : context.config.getColoring()) { if (isMatch(context, coloring)) { String result = ansi().render( context.entryText.replaceAll(coloring.getPattern(), coloring.getRender()) ).toString(); if (context.debug) { logDebugInfo(context, ... | ColorLinesMatchingPatternFilter implements LogEntryFilter { @Override public String filter(Context context) { for (LinePatternColoringConfig coloring : context.config.getColoring()) { if (isMatch(context, coloring)) { String result = ansi().render( context.entryText.replaceAll(coloring.getPattern(), coloring.getRender(... | ColorLinesMatchingPatternFilter implements LogEntryFilter { @Override public String filter(Context context) { for (LinePatternColoringConfig coloring : context.config.getColoring()) { if (isMatch(context, coloring)) { String result = ansi().render( context.entryText.replaceAll(coloring.getPattern(), coloring.getRender(... | ColorLinesMatchingPatternFilter implements LogEntryFilter { @Override public String filter(Context context) { for (LinePatternColoringConfig coloring : context.config.getColoring()) { if (isMatch(context, coloring)) { String result = ansi().render( context.entryText.replaceAll(coloring.getPattern(), coloring.getRender(... | ColorLinesMatchingPatternFilter implements LogEntryFilter { @Override public String filter(Context context) { for (LinePatternColoringConfig coloring : context.config.getColoring()) { if (isMatch(context, coloring)) { String result = ansi().render( context.entryText.replaceAll(coloring.getPattern(), coloring.getRender(... |
@Test public void lineDoesNotMatch() { Config config = config(colorConfig("hello", "@|bg_red,fg_white $0|@")); assertEquals("world", filter.filter(context(config, "world"))); } | @Override public String filter(Context context) { for (LinePatternColoringConfig coloring : context.config.getColoring()) { if (isMatch(context, coloring)) { String result = ansi().render( context.entryText.replaceAll(coloring.getPattern(), coloring.getRender()) ).toString(); if (context.debug) { logDebugInfo(context, ... | ColorLinesMatchingPatternFilter implements LogEntryFilter { @Override public String filter(Context context) { for (LinePatternColoringConfig coloring : context.config.getColoring()) { if (isMatch(context, coloring)) { String result = ansi().render( context.entryText.replaceAll(coloring.getPattern(), coloring.getRender(... | ColorLinesMatchingPatternFilter implements LogEntryFilter { @Override public String filter(Context context) { for (LinePatternColoringConfig coloring : context.config.getColoring()) { if (isMatch(context, coloring)) { String result = ansi().render( context.entryText.replaceAll(coloring.getPattern(), coloring.getRender(... | ColorLinesMatchingPatternFilter implements LogEntryFilter { @Override public String filter(Context context) { for (LinePatternColoringConfig coloring : context.config.getColoring()) { if (isMatch(context, coloring)) { String result = ansi().render( context.entryText.replaceAll(coloring.getPattern(), coloring.getRender(... | ColorLinesMatchingPatternFilter implements LogEntryFilter { @Override public String filter(Context context) { for (LinePatternColoringConfig coloring : context.config.getColoring()) { if (isMatch(context, coloring)) { String result = ansi().render( context.entryText.replaceAll(coloring.getPattern(), coloring.getRender(... |
@Test public void testInitByIdFromConfig() throws Exception { } | public static RedisPoolProperty initByIdFromConfig(String id){ RedisPoolProperty property = new RedisPoolProperty(); String pre = id+Configs.SEPARATE; List<String> lists = MythReflect.getFieldByClass(RedisPoolProperty.class); Map<String ,Object> map = new HashMap<>(); MythProperties config; try { config = PropertyFile.... | RedisPoolProperty { public static RedisPoolProperty initByIdFromConfig(String id){ RedisPoolProperty property = new RedisPoolProperty(); String pre = id+Configs.SEPARATE; List<String> lists = MythReflect.getFieldByClass(RedisPoolProperty.class); Map<String ,Object> map = new HashMap<>(); MythProperties config; try { co... | RedisPoolProperty { public static RedisPoolProperty initByIdFromConfig(String id){ RedisPoolProperty property = new RedisPoolProperty(); String pre = id+Configs.SEPARATE; List<String> lists = MythReflect.getFieldByClass(RedisPoolProperty.class); Map<String ,Object> map = new HashMap<>(); MythProperties config; try { co... | RedisPoolProperty { public static RedisPoolProperty initByIdFromConfig(String id){ RedisPoolProperty property = new RedisPoolProperty(); String pre = id+Configs.SEPARATE; List<String> lists = MythReflect.getFieldByClass(RedisPoolProperty.class); Map<String ,Object> map = new HashMap<>(); MythProperties config; try { co... | RedisPoolProperty { public static RedisPoolProperty initByIdFromConfig(String id){ RedisPoolProperty property = new RedisPoolProperty(); String pre = id+Configs.SEPARATE; List<String> lists = MythReflect.getFieldByClass(RedisPoolProperty.class); Map<String ,Object> map = new HashMap<>(); MythProperties config; try { co... |
@Test public void testSwitchPool() throws Exception { } | public boolean switchPool(String PoolId) { try { if (PropertyFile.getAllPoolConfig().containsKey(PoolId)) { currentPoolId = PoolId; return true; } else { return false; } } catch (ReadConfigException e) { e.printStackTrace(); return false; } } | PoolManagement { public boolean switchPool(String PoolId) { try { if (PropertyFile.getAllPoolConfig().containsKey(PoolId)) { currentPoolId = PoolId; return true; } else { return false; } } catch (ReadConfigException e) { e.printStackTrace(); return false; } } } | PoolManagement { public boolean switchPool(String PoolId) { try { if (PropertyFile.getAllPoolConfig().containsKey(PoolId)) { currentPoolId = PoolId; return true; } else { return false; } } catch (ReadConfigException e) { e.printStackTrace(); return false; } } private PoolManagement(); } | PoolManagement { public boolean switchPool(String PoolId) { try { if (PropertyFile.getAllPoolConfig().containsKey(PoolId)) { currentPoolId = PoolId; return true; } else { return false; } } catch (ReadConfigException e) { e.printStackTrace(); return false; } } private PoolManagement(); synchronized static PoolManagemen... | PoolManagement { public boolean switchPool(String PoolId) { try { if (PropertyFile.getAllPoolConfig().containsKey(PoolId)) { currentPoolId = PoolId; return true; } else { return false; } } catch (ReadConfigException e) { e.printStackTrace(); return false; } } private PoolManagement(); synchronized static PoolManagemen... |
@Test public void testDeleteRedisPool() throws Exception { String id = null; String result = poolManagement.deleteRedisPool(id); Assert.assertEquals(id, result); } | public String deleteRedisPool(String poolId) throws IOException { try { configFile = PropertyFile.getProperties(propertyFile); String exist = configFile.getString(poolId + Configs.SEPARATE + Configs.POOL_ID); if (exist == null) { logger.error(ExceptionInfo.DELETE_POOL_NOT_EXIST + poolId); return null; } for (String key... | PoolManagement { public String deleteRedisPool(String poolId) throws IOException { try { configFile = PropertyFile.getProperties(propertyFile); String exist = configFile.getString(poolId + Configs.SEPARATE + Configs.POOL_ID); if (exist == null) { logger.error(ExceptionInfo.DELETE_POOL_NOT_EXIST + poolId); return null; ... | PoolManagement { public String deleteRedisPool(String poolId) throws IOException { try { configFile = PropertyFile.getProperties(propertyFile); String exist = configFile.getString(poolId + Configs.SEPARATE + Configs.POOL_ID); if (exist == null) { logger.error(ExceptionInfo.DELETE_POOL_NOT_EXIST + poolId); return null; ... | PoolManagement { public String deleteRedisPool(String poolId) throws IOException { try { configFile = PropertyFile.getProperties(propertyFile); String exist = configFile.getString(poolId + Configs.SEPARATE + Configs.POOL_ID); if (exist == null) { logger.error(ExceptionInfo.DELETE_POOL_NOT_EXIST + poolId); return null; ... | PoolManagement { public String deleteRedisPool(String poolId) throws IOException { try { configFile = PropertyFile.getProperties(propertyFile); String exist = configFile.getString(poolId + Configs.SEPARATE + Configs.POOL_ID); if (exist == null) { logger.error(ExceptionInfo.DELETE_POOL_NOT_EXIST + poolId); return null; ... |
@Test public void testClearAllPools() throws Exception { } | public boolean clearAllPools() throws Exception { int maxId = PropertyFile.getMaxId(); for (int i = Configs.START_ID; i <= maxId; i++) { String result = deleteRedisPool(i + ""); if (result != null) { logger.info(NoticeInfo.DELETE_POOL_SUCCESS + i); } else { logger.info(NoticeInfo.DELETE_POOL_FAILED + i); } } return tru... | PoolManagement { public boolean clearAllPools() throws Exception { int maxId = PropertyFile.getMaxId(); for (int i = Configs.START_ID; i <= maxId; i++) { String result = deleteRedisPool(i + ""); if (result != null) { logger.info(NoticeInfo.DELETE_POOL_SUCCESS + i); } else { logger.info(NoticeInfo.DELETE_POOL_FAILED + i... | PoolManagement { public boolean clearAllPools() throws Exception { int maxId = PropertyFile.getMaxId(); for (int i = Configs.START_ID; i <= maxId; i++) { String result = deleteRedisPool(i + ""); if (result != null) { logger.info(NoticeInfo.DELETE_POOL_SUCCESS + i); } else { logger.info(NoticeInfo.DELETE_POOL_FAILED + i... | PoolManagement { public boolean clearAllPools() throws Exception { int maxId = PropertyFile.getMaxId(); for (int i = Configs.START_ID; i <= maxId; i++) { String result = deleteRedisPool(i + ""); if (result != null) { logger.info(NoticeInfo.DELETE_POOL_SUCCESS + i); } else { logger.info(NoticeInfo.DELETE_POOL_FAILED + i... | PoolManagement { public boolean clearAllPools() throws Exception { int maxId = PropertyFile.getMaxId(); for (int i = Configs.START_ID; i <= maxId; i++) { String result = deleteRedisPool(i + ""); if (result != null) { logger.info(NoticeInfo.DELETE_POOL_SUCCESS + i); } else { logger.info(NoticeInfo.DELETE_POOL_FAILED + i... |
@Test public void testDestroyRedisPool() throws Exception { boolean result = poolManagement.destroyRedisPool("1292"); Assert.assertEquals(false, result); } | public boolean destroyRedisPool(String poolId) { if (poolMap.containsKey(poolId)) { boolean flag = poolMap.get(poolId).destroyPool(); poolMap.remove(poolId); return flag; } else { return false; } } | PoolManagement { public boolean destroyRedisPool(String poolId) { if (poolMap.containsKey(poolId)) { boolean flag = poolMap.get(poolId).destroyPool(); poolMap.remove(poolId); return flag; } else { return false; } } } | PoolManagement { public boolean destroyRedisPool(String poolId) { if (poolMap.containsKey(poolId)) { boolean flag = poolMap.get(poolId).destroyPool(); poolMap.remove(poolId); return flag; } else { return false; } } private PoolManagement(); } | PoolManagement { public boolean destroyRedisPool(String poolId) { if (poolMap.containsKey(poolId)) { boolean flag = poolMap.get(poolId).destroyPool(); poolMap.remove(poolId); return flag; } else { return false; } } private PoolManagement(); synchronized static PoolManagement getInstance(); RedisPools getRedisPool(); R... | PoolManagement { public boolean destroyRedisPool(String poolId) { if (poolMap.containsKey(poolId)) { boolean flag = poolMap.get(poolId).destroyPool(); poolMap.remove(poolId); return flag; } else { return false; } } private PoolManagement(); synchronized static PoolManagement getInstance(); RedisPools getRedisPool(); R... |
@Test public void testGetFieldsByInstance() throws Exception { Target target = new Target(); List<String> result = MythReflect.getFieldsByInstance(target); Assert.assertEquals(Collections.<String>singletonList("name"), result); } | public static List<String> getFieldsByInstance(Object object) throws IllegalAccessException { target = object.getClass(); return getFieldByClass(target); } | MythReflect { public static List<String> getFieldsByInstance(Object object) throws IllegalAccessException { target = object.getClass(); return getFieldByClass(target); } } | MythReflect { public static List<String> getFieldsByInstance(Object object) throws IllegalAccessException { target = object.getClass(); return getFieldByClass(target); } } | MythReflect { public static List<String> getFieldsByInstance(Object object) throws IllegalAccessException { target = object.getClass(); return getFieldByClass(target); } static List<String> getFieldsByInstance(Object object); static List<String> getFieldByClass(Class targets); static Map<String, Object> getFieldsValue... | MythReflect { public static List<String> getFieldsByInstance(Object object) throws IllegalAccessException { target = object.getClass(); return getFieldByClass(target); } static List<String> getFieldsByInstance(Object object); static List<String> getFieldByClass(Class targets); static Map<String, Object> getFieldsValue... |
@Test public void testGetFieldByClass() throws Exception { List<String> result = MythReflect.getFieldByClass(Target.class); Assert.assertEquals(Collections.<String>singletonList("name"), result); } | public static List<String> getFieldByClass(Class targets) { target = targets; List<String> list = new ArrayList<>(); Field[] fields = target.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); String name = field.getName(); list.add(name); } return list; } | MythReflect { public static List<String> getFieldByClass(Class targets) { target = targets; List<String> list = new ArrayList<>(); Field[] fields = target.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); String name = field.getName(); list.add(name); } return list; } } | MythReflect { public static List<String> getFieldByClass(Class targets) { target = targets; List<String> list = new ArrayList<>(); Field[] fields = target.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); String name = field.getName(); list.add(name); } return list; } } | MythReflect { public static List<String> getFieldByClass(Class targets) { target = targets; List<String> list = new ArrayList<>(); Field[] fields = target.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); String name = field.getName(); list.add(name); } return list; } static List<String> get... | MythReflect { public static List<String> getFieldByClass(Class targets) { target = targets; List<String> list = new ArrayList<>(); Field[] fields = target.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); String name = field.getName(); list.add(name); } return list; } static List<String> get... |
@Test public void testGetFieldsValue() throws Exception { Target target = new Target(); target.setName("myth"); Map<String, Object> result = MythReflect.getFieldsValue(target); Assert.assertEquals(new HashMap<String, Object>() {{ put("name", "myth"); }}, result); } | public static Map<String, Object> getFieldsValue(Object object) throws IllegalAccessException { Map<String, Object> map = new HashMap<>(); target = object.getClass(); for (Field field : target.getDeclaredFields()) { field.setAccessible(true); Object value = field.get(object); String name = field.getName(); map.put(name... | MythReflect { public static Map<String, Object> getFieldsValue(Object object) throws IllegalAccessException { Map<String, Object> map = new HashMap<>(); target = object.getClass(); for (Field field : target.getDeclaredFields()) { field.setAccessible(true); Object value = field.get(object); String name = field.getName()... | MythReflect { public static Map<String, Object> getFieldsValue(Object object) throws IllegalAccessException { Map<String, Object> map = new HashMap<>(); target = object.getClass(); for (Field field : target.getDeclaredFields()) { field.setAccessible(true); Object value = field.get(object); String name = field.getName()... | MythReflect { public static Map<String, Object> getFieldsValue(Object object) throws IllegalAccessException { Map<String, Object> map = new HashMap<>(); target = object.getClass(); for (Field field : target.getDeclaredFields()) { field.setAccessible(true); Object value = field.get(object); String name = field.getName()... | MythReflect { public static Map<String, Object> getFieldsValue(Object object) throws IllegalAccessException { Map<String, Object> map = new HashMap<>(); target = object.getClass(); for (Field field : target.getDeclaredFields()) { field.setAccessible(true); Object value = field.get(object); String name = field.getName()... |
@Test public void testSetFieldsValue() throws Exception { Target target = new Target(); Target result = (Target) MythReflect.setFieldsValue(target, new HashMap<String, Object>() {{ put("name", "myth"); }}); Assert.assertEquals("myth", result.getName()); } | public static Object setFieldsValue(Object object, Map<String, Object> maps) throws Exception { target = object.getClass(); try { for (Field field : target.getDeclaredFields()) { field.setAccessible(true); String type = field.getType().getName(); switch (type) { case "java.lang.Integer": field.set(object, Integer.parse... | MythReflect { public static Object setFieldsValue(Object object, Map<String, Object> maps) throws Exception { target = object.getClass(); try { for (Field field : target.getDeclaredFields()) { field.setAccessible(true); String type = field.getType().getName(); switch (type) { case "java.lang.Integer": field.set(object,... | MythReflect { public static Object setFieldsValue(Object object, Map<String, Object> maps) throws Exception { target = object.getClass(); try { for (Field field : target.getDeclaredFields()) { field.setAccessible(true); String type = field.getType().getName(); switch (type) { case "java.lang.Integer": field.set(object,... | MythReflect { public static Object setFieldsValue(Object object, Map<String, Object> maps) throws Exception { target = object.getClass(); try { for (Field field : target.getDeclaredFields()) { field.setAccessible(true); String type = field.getType().getName(); switch (type) { case "java.lang.Integer": field.set(object,... | MythReflect { public static Object setFieldsValue(Object object, Map<String, Object> maps) throws Exception { target = object.getClass(); try { for (Field field : target.getDeclaredFields()) { field.setAccessible(true); String type = field.getType().getName(); switch (type) { case "java.lang.Integer": field.set(object,... |
@Test public void getTime() throws Exception { System.out.println(MythTime.getTime()); } | public static String getTime() { Date date = new Date(); simpleDateFormat = new SimpleDateFormat("HH:mm:ss:MM"); return simpleDateFormat.format(date); } | MythTime { public static String getTime() { Date date = new Date(); simpleDateFormat = new SimpleDateFormat("HH:mm:ss:MM"); return simpleDateFormat.format(date); } } | MythTime { public static String getTime() { Date date = new Date(); simpleDateFormat = new SimpleDateFormat("HH:mm:ss:MM"); return simpleDateFormat.format(date); } } | MythTime { public static String getTime() { Date date = new Date(); simpleDateFormat = new SimpleDateFormat("HH:mm:ss:MM"); return simpleDateFormat.format(date); } static String getTime(); static String getDateTime(); static String getDate(); } | MythTime { public static String getTime() { Date date = new Date(); simpleDateFormat = new SimpleDateFormat("HH:mm:ss:MM"); return simpleDateFormat.format(date); } static String getTime(); static String getDateTime(); static String getDate(); } |
@Test public void getDateTime() throws Exception { System.out.println(MythTime.getDateTime()); } | public static String getDateTime() { Date date = new Date(); simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:MM"); return simpleDateFormat.format(date); } | MythTime { public static String getDateTime() { Date date = new Date(); simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:MM"); return simpleDateFormat.format(date); } } | MythTime { public static String getDateTime() { Date date = new Date(); simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:MM"); return simpleDateFormat.format(date); } } | MythTime { public static String getDateTime() { Date date = new Date(); simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:MM"); return simpleDateFormat.format(date); } static String getTime(); static String getDateTime(); static String getDate(); } | MythTime { public static String getDateTime() { Date date = new Date(); simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:MM"); return simpleDateFormat.format(date); } static String getTime(); static String getDateTime(); static String getDate(); } |
@Test public void testSave() throws Exception { PropertyFile.delete(testKey); String result = PropertyFile.save(testKey, "value"); PropertyFile.delete(testKey); Assert.assertEquals(null, result); } | public static String save(String key, String value) throws ReadConfigException { String result; try { getFromFile(); result = (String)props.setProperty(key, value); props.store(fos, "Update '" + key + "' value"); } catch (IOException e) { e.printStackTrace(); throw new ReadConfigException(ExceptionInfo.SAVE_CONFIG__KEY... | PropertyFile { public static String save(String key, String value) throws ReadConfigException { String result; try { getFromFile(); result = (String)props.setProperty(key, value); props.store(fos, "Update '" + key + "' value"); } catch (IOException e) { e.printStackTrace(); throw new ReadConfigException(ExceptionInfo.S... | PropertyFile { public static String save(String key, String value) throws ReadConfigException { String result; try { getFromFile(); result = (String)props.setProperty(key, value); props.store(fos, "Update '" + key + "' value"); } catch (IOException e) { e.printStackTrace(); throw new ReadConfigException(ExceptionInfo.S... | PropertyFile { public static String save(String key, String value) throws ReadConfigException { String result; try { getFromFile(); result = (String)props.setProperty(key, value); props.store(fos, "Update '" + key + "' value"); } catch (IOException e) { e.printStackTrace(); throw new ReadConfigException(ExceptionInfo.S... | PropertyFile { public static String save(String key, String value) throws ReadConfigException { String result; try { getFromFile(); result = (String)props.setProperty(key, value); props.store(fos, "Update '" + key + "' value"); } catch (IOException e) { e.printStackTrace(); throw new ReadConfigException(ExceptionInfo.S... |
@Test public void testDate(){ System.out.println(MythTime.getDate()); } | public static String getDate() { Date date = new Date(); simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); return simpleDateFormat.format(date); } | MythTime { public static String getDate() { Date date = new Date(); simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); return simpleDateFormat.format(date); } } | MythTime { public static String getDate() { Date date = new Date(); simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); return simpleDateFormat.format(date); } } | MythTime { public static String getDate() { Date date = new Date(); simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); return simpleDateFormat.format(date); } static String getTime(); static String getDateTime(); static String getDate(); } | MythTime { public static String getDate() { Date date = new Date(); simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); return simpleDateFormat.format(date); } static String getTime(); static String getDateTime(); static String getDate(); } |
@Test public void testRPush() throws Exception { redisList.deleteKey(testKey); redisList.rPush(testKey, "values"); redisList.rPush(testKey, "values"); redisList.rPush(testKey, "values"); redisList.rPush(testKey, "values"); redisList.rPush(testKey, "values"); long result = redisList.rPush(testKey, "values"); Assert.asse... | public long rPush(String key, String... values) { return getJedis().rpush(key, values); } | RedisList extends Commands { public long rPush(String key, String... values) { return getJedis().rpush(key, values); } } | RedisList extends Commands { public long rPush(String key, String... values) { return getJedis().rpush(key, values); } private RedisList(); } | RedisList extends Commands { public long rPush(String key, String... values) { return getJedis().rpush(key, values); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPu... | RedisList extends Commands { public long rPush(String key, String... values) { return getJedis().rpush(key, values); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPu... |
@Test public void testLPush() throws Exception { redisList.deleteKey(testKey); long result = redisList.lPush(testKey, "values"); Assert.assertEquals(1L, result); } | public long lPush(String key, String... values) { return getJedis().lpush(key, values); } | RedisList extends Commands { public long lPush(String key, String... values) { return getJedis().lpush(key, values); } } | RedisList extends Commands { public long lPush(String key, String... values) { return getJedis().lpush(key, values); } private RedisList(); } | RedisList extends Commands { public long lPush(String key, String... values) { return getJedis().lpush(key, values); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPu... | RedisList extends Commands { public long lPush(String key, String... values) { return getJedis().lpush(key, values); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPu... |
@Test public void testLPushX() throws Exception { redisList.deleteKey(testKey); long result = redisList.lPushX(testKey, "value"); Assert.assertEquals(0L, result); } | public long lPushX(String key, String... value) { return getJedis().lpushx(key, value); } | RedisList extends Commands { public long lPushX(String key, String... value) { return getJedis().lpushx(key, value); } } | RedisList extends Commands { public long lPushX(String key, String... value) { return getJedis().lpushx(key, value); } private RedisList(); } | RedisList extends Commands { public long lPushX(String key, String... value) { return getJedis().lpushx(key, value); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPu... | RedisList extends Commands { public long lPushX(String key, String... value) { return getJedis().lpushx(key, value); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPu... |
@Test public void testRPushX() throws Exception { deleteKeyForTest(); long result = redisList.rPushX(testKey, "value"); Assert.assertEquals(0L, result); } | public long rPushX(String key, String... value) { return getJedis().rpushx(key, value); } | RedisList extends Commands { public long rPushX(String key, String... value) { return getJedis().rpushx(key, value); } } | RedisList extends Commands { public long rPushX(String key, String... value) { return getJedis().rpushx(key, value); } private RedisList(); } | RedisList extends Commands { public long rPushX(String key, String... value) { return getJedis().rpushx(key, value); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPu... | RedisList extends Commands { public long rPushX(String key, String... value) { return getJedis().rpushx(key, value); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPu... |
@Test public void testRPop() throws Exception { deleteKeyForTest(); redisList.rPush(testKey,"1","2"); String result = redisList.rPop(testKey); Assert.assertEquals("2", result); deleteKeyForTest(); } | public String rPop(String key) { return getJedis().rpop(key); } | RedisList extends Commands { public String rPop(String key) { return getJedis().rpop(key); } } | RedisList extends Commands { public String rPop(String key) { return getJedis().rpop(key); } private RedisList(); } | RedisList extends Commands { public String rPop(String key) { return getJedis().rpop(key); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPushX(String key, String... ... | RedisList extends Commands { public String rPop(String key) { return getJedis().rpop(key); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPushX(String key, String... ... |
@Test public void testLPop() throws Exception { redisList.deleteKey(testKey); String result = redisList.lPop(testKey); Assert.assertEquals(null, result); } | public String lPop(String key) { return getJedis().lpop(key); } | RedisList extends Commands { public String lPop(String key) { return getJedis().lpop(key); } } | RedisList extends Commands { public String lPop(String key) { return getJedis().lpop(key); } private RedisList(); } | RedisList extends Commands { public String lPop(String key) { return getJedis().lpop(key); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPushX(String key, String... ... | RedisList extends Commands { public String lPop(String key) { return getJedis().lpop(key); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPushX(String key, String... ... |
@Test public void testRPopLPush() throws Exception { redisList.deleteKey("one"); redisList.deleteKey("other"); redisList.rPush("one","1"); redisList.rPush("other","2"); Assert.assertEquals("1",redisList.rPopLPush("one", "other")); Assert.assertEquals(null,redisList.rPopLPush("one", "other")); redisList.deleteKey("one")... | public String rPopLPush(String one, String other) { return getJedis().rpoplpush(one, other); } | RedisList extends Commands { public String rPopLPush(String one, String other) { return getJedis().rpoplpush(one, other); } } | RedisList extends Commands { public String rPopLPush(String one, String other) { return getJedis().rpoplpush(one, other); } private RedisList(); } | RedisList extends Commands { public String rPopLPush(String one, String other) { return getJedis().rpoplpush(one, other); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); lon... | RedisList extends Commands { public String rPopLPush(String one, String other) { return getJedis().rpoplpush(one, other); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); lon... |
@Test public void testLength() throws Exception { deleteKeyForTest(); redisList.rPush(testKey,"1"); redisList.lPush(testKey,"2"); long result = redisList.length(testKey); Assert.assertEquals(2L, result); deleteKeyForTest(); } | public long length(String key) { return getJedis().llen(key); } | RedisList extends Commands { public long length(String key) { return getJedis().llen(key); } } | RedisList extends Commands { public long length(String key) { return getJedis().llen(key); } private RedisList(); } | RedisList extends Commands { public long length(String key) { return getJedis().llen(key); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPushX(String key, String... ... | RedisList extends Commands { public long length(String key) { return getJedis().llen(key); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPushX(String key, String... ... |
@Test public void testSetByIndex() throws Exception { redisList.lPush(testKey,"12"); String result = redisList.setByIndex(testKey, 0L, "value"); Assert.assertEquals("OK", result); deleteKeyForTest(); } | public String setByIndex(String key, long index, String value) throws ActionErrorException { String result; try { result = getJedis().lset(key, index, value); return result; } catch (Exception e) { throw new ActionErrorException(ExceptionInfo.KEY_NOT_EXIST, e, RedisList.class); } } | RedisList extends Commands { public String setByIndex(String key, long index, String value) throws ActionErrorException { String result; try { result = getJedis().lset(key, index, value); return result; } catch (Exception e) { throw new ActionErrorException(ExceptionInfo.KEY_NOT_EXIST, e, RedisList.class); } } } | RedisList extends Commands { public String setByIndex(String key, long index, String value) throws ActionErrorException { String result; try { result = getJedis().lset(key, index, value); return result; } catch (Exception e) { throw new ActionErrorException(ExceptionInfo.KEY_NOT_EXIST, e, RedisList.class); } } private ... | RedisList extends Commands { public String setByIndex(String key, long index, String value) throws ActionErrorException { String result; try { result = getJedis().lset(key, index, value); return result; } catch (Exception e) { throw new ActionErrorException(ExceptionInfo.KEY_NOT_EXIST, e, RedisList.class); } } private ... | RedisList extends Commands { public String setByIndex(String key, long index, String value) throws ActionErrorException { String result; try { result = getJedis().lset(key, index, value); return result; } catch (Exception e) { throw new ActionErrorException(ExceptionInfo.KEY_NOT_EXIST, e, RedisList.class); } } private ... |
@Test public void testDelete() throws Exception { String result = PropertyFile.delete(testKey); Assert.assertEquals(null, result); } | public static String delete(String key) throws ReadConfigException { String result; try { getFromFile(); result = (String) props.remove(key); props.store(fos, "Delete '" + key + "' value"); }catch (Exception e){ e.printStackTrace(); throw new ReadConfigException(ExceptionInfo.DELETE_CONFIG_KEY_FAILED,e,PropertyFile.cla... | PropertyFile { public static String delete(String key) throws ReadConfigException { String result; try { getFromFile(); result = (String) props.remove(key); props.store(fos, "Delete '" + key + "' value"); }catch (Exception e){ e.printStackTrace(); throw new ReadConfigException(ExceptionInfo.DELETE_CONFIG_KEY_FAILED,e,P... | PropertyFile { public static String delete(String key) throws ReadConfigException { String result; try { getFromFile(); result = (String) props.remove(key); props.store(fos, "Delete '" + key + "' value"); }catch (Exception e){ e.printStackTrace(); throw new ReadConfigException(ExceptionInfo.DELETE_CONFIG_KEY_FAILED,e,P... | PropertyFile { public static String delete(String key) throws ReadConfigException { String result; try { getFromFile(); result = (String) props.remove(key); props.store(fos, "Delete '" + key + "' value"); }catch (Exception e){ e.printStackTrace(); throw new ReadConfigException(ExceptionInfo.DELETE_CONFIG_KEY_FAILED,e,P... | PropertyFile { public static String delete(String key) throws ReadConfigException { String result; try { getFromFile(); result = (String) props.remove(key); props.store(fos, "Delete '" + key + "' value"); }catch (Exception e){ e.printStackTrace(); throw new ReadConfigException(ExceptionInfo.DELETE_CONFIG_KEY_FAILED,e,P... |
@Test public void testInsertAfter() throws Exception { deleteKeyForTest(); redisList.lPush(testKey,"12"); long result = redisList.insertAfter(testKey, "12", "value"); Assert.assertEquals(2L, result); deleteKeyForTest(); } | public long insertAfter(String key, String pivot, String value) { return getJedis().linsert(key, BinaryClient.LIST_POSITION.AFTER, pivot, value); } | RedisList extends Commands { public long insertAfter(String key, String pivot, String value) { return getJedis().linsert(key, BinaryClient.LIST_POSITION.AFTER, pivot, value); } } | RedisList extends Commands { public long insertAfter(String key, String pivot, String value) { return getJedis().linsert(key, BinaryClient.LIST_POSITION.AFTER, pivot, value); } private RedisList(); } | RedisList extends Commands { public long insertAfter(String key, String pivot, String value) { return getJedis().linsert(key, BinaryClient.LIST_POSITION.AFTER, pivot, value); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... v... | RedisList extends Commands { public long insertAfter(String key, String pivot, String value) { return getJedis().linsert(key, BinaryClient.LIST_POSITION.AFTER, pivot, value); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... v... |
@Test public void testInsertBefore() throws Exception { deleteKeyForTest(); redisList.lPush(testKey,"12"); long result = redisList.insertBefore(testKey, "12", "value"); Assert.assertEquals(2L, result); deleteKeyForTest(); } | public long insertBefore(String key, String pivot, String value) { return getJedis().linsert(key, BinaryClient.LIST_POSITION.BEFORE, pivot, value); } | RedisList extends Commands { public long insertBefore(String key, String pivot, String value) { return getJedis().linsert(key, BinaryClient.LIST_POSITION.BEFORE, pivot, value); } } | RedisList extends Commands { public long insertBefore(String key, String pivot, String value) { return getJedis().linsert(key, BinaryClient.LIST_POSITION.BEFORE, pivot, value); } private RedisList(); } | RedisList extends Commands { public long insertBefore(String key, String pivot, String value) { return getJedis().linsert(key, BinaryClient.LIST_POSITION.BEFORE, pivot, value); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String...... | RedisList extends Commands { public long insertBefore(String key, String pivot, String value) { return getJedis().linsert(key, BinaryClient.LIST_POSITION.BEFORE, pivot, value); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String...... |
@Test public void testRange() throws Exception { deleteKeyForTest(); redisList.rPush(testKey,"23","12"); List<String> result = redisList.range(testKey, 0L, -1L); Assert.assertEquals(Arrays.<String>asList("23","12"), result); deleteKeyForTest(); } | public List<String> range(String key, long start, long end) { logger.debug("Get range: [" + key + "] form " + start + " to " + end); return getJedis().lrange(key, start, end); } | RedisList extends Commands { public List<String> range(String key, long start, long end) { logger.debug("Get range: [" + key + "] form " + start + " to " + end); return getJedis().lrange(key, start, end); } } | RedisList extends Commands { public List<String> range(String key, long start, long end) { logger.debug("Get range: [" + key + "] form " + start + " to " + end); return getJedis().lrange(key, start, end); } private RedisList(); } | RedisList extends Commands { public List<String> range(String key, long start, long end) { logger.debug("Get range: [" + key + "] form " + start + " to " + end); return getJedis().lrange(key, start, end); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long... | RedisList extends Commands { public List<String> range(String key, long start, long end) { logger.debug("Get range: [" + key + "] form " + start + " to " + end); return getJedis().lrange(key, start, end); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long... |
@Test public void testRemove() throws Exception { deleteKeyForTest(); redisList.lPush(testKey,"23","123","23"); redisList.remove(testKey, 1L, "23"); Assert.assertEquals(Arrays.<String>asList("123","23"), redisList.allElements(testKey)); redisList.lPush(testKey,"23"); redisList.remove(testKey, -1L, "23"); Assert.assertE... | public long remove(String key, long count, String value) { return getJedis().lrem(key, count, value); } | RedisList extends Commands { public long remove(String key, long count, String value) { return getJedis().lrem(key, count, value); } } | RedisList extends Commands { public long remove(String key, long count, String value) { return getJedis().lrem(key, count, value); } private RedisList(); } | RedisList extends Commands { public long remove(String key, long count, String value) { return getJedis().lrem(key, count, value); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... va... | RedisList extends Commands { public long remove(String key, long count, String value) { return getJedis().lrem(key, count, value); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... va... |
@Test public void testTrim() throws Exception { deleteKeyForTest(); redisList.rPush(testKey,"1","2","3","4"); String result = redisList.trim(testKey, 0L, 1L); Assert.assertEquals(Arrays.<String>asList("1","2"), redisList.allElements(testKey)); Assert.assertEquals("OK",result); } | public String trim(String key, long start, long end) { return getJedis().ltrim(key, start, end); } | RedisList extends Commands { public String trim(String key, long start, long end) { return getJedis().ltrim(key, start, end); } } | RedisList extends Commands { public String trim(String key, long start, long end) { return getJedis().ltrim(key, start, end); } private RedisList(); } | RedisList extends Commands { public String trim(String key, long start, long end) { return getJedis().ltrim(key, start, end); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value);... | RedisList extends Commands { public String trim(String key, long start, long end) { return getJedis().ltrim(key, start, end); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value);... |
@Test public void testIndex() throws Exception { deleteKeyForTest(); redisList.rPush(testKey,"tests"); String result = redisList.index(testKey, 0L); Assert.assertEquals("tests", result); deleteKeyForTest(); } | public String index(String key, long index) { return getJedis().lindex(key, index); } | RedisList extends Commands { public String index(String key, long index) { return getJedis().lindex(key, index); } } | RedisList extends Commands { public String index(String key, long index) { return getJedis().lindex(key, index); } private RedisList(); } | RedisList extends Commands { public String index(String key, long index) { return getJedis().lindex(key, index); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPushX(... | RedisList extends Commands { public String index(String key, long index) { return getJedis().lindex(key, index); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPushX(... |
@Test public void testType() throws Exception { deleteKeyForTest(); redisList.rPush(testKey,"er"); String result = redisList.type(testKey); Assert.assertEquals("list", result); deleteKeyForTest(); } | public long rPush(String key, String... values) { return getJedis().rpush(key, values); } | RedisList extends Commands { public long rPush(String key, String... values) { return getJedis().rpush(key, values); } } | RedisList extends Commands { public long rPush(String key, String... values) { return getJedis().rpush(key, values); } private RedisList(); } | RedisList extends Commands { public long rPush(String key, String... values) { return getJedis().rpush(key, values); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPu... | RedisList extends Commands { public long rPush(String key, String... values) { return getJedis().rpush(key, values); } private RedisList(); synchronized static RedisList getInstance(); long rPush(String key, String... values); long lPush(String key, String... values); long lPushX(String key, String... value); long rPu... |
@Test public void testAdd() throws Exception { deleteKey(); Long result = redisSet.save(key, "member","12","12"); Assert.assertEquals((Long)2L, result); showKey(); deleteKey(); } | public Long save(String key, String... member) { return getJedis().sadd(key, member); } | RedisSet extends Commands { public Long save(String key, String... member) { return getJedis().sadd(key, member); } } | RedisSet extends Commands { public Long save(String key, String... member) { return getJedis().sadd(key, member); } private RedisSet(); } | RedisSet extends Commands { public Long save(String key, String... member) { return getJedis().sadd(key, member); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String pop(Stri... | RedisSet extends Commands { public Long save(String key, String... member) { return getJedis().sadd(key, member); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String pop(Stri... |
@Test public void testRemove() throws Exception { redisSet.save(key,"2","23","3434","343223"); Long result = redisSet.remove(key, "2","23"); Assert.assertEquals((Long)2L, result); deleteKey(); } | public Long remove(String key, String... members) { return getJedis().srem(key, members); } | RedisSet extends Commands { public Long remove(String key, String... members) { return getJedis().srem(key, members); } } | RedisSet extends Commands { public Long remove(String key, String... members) { return getJedis().srem(key, members); } private RedisSet(); } | RedisSet extends Commands { public Long remove(String key, String... members) { return getJedis().srem(key, members); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String pop(... | RedisSet extends Commands { public Long remove(String key, String... members) { return getJedis().srem(key, members); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String pop(... |
@Test public void testGetMembersSet() throws Exception { redisSet.save(key,"2","23"); Set<String> result = redisSet.getMembersSet(key); Assert.assertEquals(new HashSet<String>(Arrays.asList("2","23")), result); deleteKey(); } | public Set<String> getMembersSet(String key) { return getJedis().smembers(key); } | RedisSet extends Commands { public Set<String> getMembersSet(String key) { return getJedis().smembers(key); } } | RedisSet extends Commands { public Set<String> getMembersSet(String key) { return getJedis().smembers(key); } private RedisSet(); } | RedisSet extends Commands { public Set<String> getMembersSet(String key) { return getJedis().smembers(key); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String pop(String key... | RedisSet extends Commands { public Set<String> getMembersSet(String key) { return getJedis().smembers(key); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String pop(String key... |
@Test public void testUpdate() throws Exception { PropertyFile.save(testKey,"origin"); String result = PropertyFile.update(testKey, "value"); PropertyFile.delete(testKey); Assert.assertEquals("origin", result); } | public static String update(String key,String value) throws ReadConfigException { String result; try { props = getProperties(Configs.PROPERTY_FILE); OutputStream fos = new FileOutputStream(Configs.PROPERTY_FILE); result = (String)props.replace(key,value); props.store(fos, "Update '" + key + "' value"); }catch (Exceptio... | PropertyFile { public static String update(String key,String value) throws ReadConfigException { String result; try { props = getProperties(Configs.PROPERTY_FILE); OutputStream fos = new FileOutputStream(Configs.PROPERTY_FILE); result = (String)props.replace(key,value); props.store(fos, "Update '" + key + "' value"); }... | PropertyFile { public static String update(String key,String value) throws ReadConfigException { String result; try { props = getProperties(Configs.PROPERTY_FILE); OutputStream fos = new FileOutputStream(Configs.PROPERTY_FILE); result = (String)props.replace(key,value); props.store(fos, "Update '" + key + "' value"); }... | PropertyFile { public static String update(String key,String value) throws ReadConfigException { String result; try { props = getProperties(Configs.PROPERTY_FILE); OutputStream fos = new FileOutputStream(Configs.PROPERTY_FILE); result = (String)props.replace(key,value); props.store(fos, "Update '" + key + "' value"); }... | PropertyFile { public static String update(String key,String value) throws ReadConfigException { String result; try { props = getProperties(Configs.PROPERTY_FILE); OutputStream fos = new FileOutputStream(Configs.PROPERTY_FILE); result = (String)props.replace(key,value); props.store(fos, "Update '" + key + "' value"); }... |
@Test public void testPop() throws Exception { redisSet.save(key,"1","2","3"); String result = redisSet.pop(key); System.out.println("随机删除:"+result); Long results = redisSet.size(key); Assert.assertEquals((Long)2L,results); deleteKey(); } | public String pop(String key) { return getJedis().spop(key); } | RedisSet extends Commands { public String pop(String key) { return getJedis().spop(key); } } | RedisSet extends Commands { public String pop(String key) { return getJedis().spop(key); } private RedisSet(); } | RedisSet extends Commands { public String pop(String key) { return getJedis().spop(key); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String pop(String key); Set<String> pop(... | RedisSet extends Commands { public String pop(String key) { return getJedis().spop(key); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String pop(String key); Set<String> pop(... |
@Test public void testContain() throws Exception { redisSet.save(key,"member"); boolean result = redisSet.contain(key, "member"); Assert.assertEquals(true, result); deleteKey(); } | public boolean contain(String key, String member) { return getJedis().sismember(key, member); } | RedisSet extends Commands { public boolean contain(String key, String member) { return getJedis().sismember(key, member); } } | RedisSet extends Commands { public boolean contain(String key, String member) { return getJedis().sismember(key, member); } private RedisSet(); } | RedisSet extends Commands { public boolean contain(String key, String member) { return getJedis().sismember(key, member); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String ... | RedisSet extends Commands { public boolean contain(String key, String member) { return getJedis().sismember(key, member); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String ... |
@Test public void testRandomMember() throws Exception { redisSet.save(key,"sa"); String result = redisSet.randomMember(key); assert result!=null; deleteKey(); } | public String randomMember(String key) { return getJedis().srandmember(key); } | RedisSet extends Commands { public String randomMember(String key) { return getJedis().srandmember(key); } } | RedisSet extends Commands { public String randomMember(String key) { return getJedis().srandmember(key); } private RedisSet(); } | RedisSet extends Commands { public String randomMember(String key) { return getJedis().srandmember(key); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String pop(String key); ... | RedisSet extends Commands { public String randomMember(String key) { return getJedis().srandmember(key); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String pop(String key); ... |
@Test public void testInter() throws Exception { redisSet.save(key,"1","2","3"); redisSet.save("1","2","4"); Set<String> result = redisSet.inter(key,"1"); Assert.assertEquals(new HashSet<String>(Arrays.asList("2")), result); redisSet.deleteKey(key,"1"); } | public Set<String> inter(String... keys) { return getJedis().sinter(keys); } | RedisSet extends Commands { public Set<String> inter(String... keys) { return getJedis().sinter(keys); } } | RedisSet extends Commands { public Set<String> inter(String... keys) { return getJedis().sinter(keys); } private RedisSet(); } | RedisSet extends Commands { public Set<String> inter(String... keys) { return getJedis().sinter(keys); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String pop(String key); Se... | RedisSet extends Commands { public Set<String> inter(String... keys) { return getJedis().sinter(keys); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String pop(String key); Se... |
@Test public void testInterStore() throws Exception { redisSet.save("store","1","23","45"); System.out.println(redisSet.getMembersSet("store")); redisSet.save(key,"1","2","3"); redisSet.save("1","2","4"); Long f = redisSet.interStore("store",key,"1"); System.out.println(f+" : "+redisSet.getMembersSet("store").toString(... | public Long interStore(String key, String... keys) { return getJedis().sinterstore(key, keys); } | RedisSet extends Commands { public Long interStore(String key, String... keys) { return getJedis().sinterstore(key, keys); } } | RedisSet extends Commands { public Long interStore(String key, String... keys) { return getJedis().sinterstore(key, keys); } private RedisSet(); } | RedisSet extends Commands { public Long interStore(String key, String... keys) { return getJedis().sinterstore(key, keys); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String... | RedisSet extends Commands { public Long interStore(String key, String... keys) { return getJedis().sinterstore(key, keys); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String... |
@Test public void testUnion() throws Exception { redisSet.save("1","1","2","3"); redisSet.save("2","2","3","4"); Set<String> result = redisSet.union("1","2"); Assert.assertEquals(new HashSet<String>(Arrays.asList("1","2","3","4")), result); redisSet.deleteKey("1","2"); } | public Set<String> union(String... keys) { return getJedis().sunion(keys); } | RedisSet extends Commands { public Set<String> union(String... keys) { return getJedis().sunion(keys); } } | RedisSet extends Commands { public Set<String> union(String... keys) { return getJedis().sunion(keys); } private RedisSet(); } | RedisSet extends Commands { public Set<String> union(String... keys) { return getJedis().sunion(keys); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String pop(String key); Se... | RedisSet extends Commands { public Set<String> union(String... keys) { return getJedis().sunion(keys); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String pop(String key); Se... |
@Test public void testUnionStore() throws Exception { redisSet.save("1","1","2","3"); redisSet.save("2","2","3","4"); Long num = redisSet.unionStore("store","1","2"); System.out.println(num); Set<String> result = redisSet.getMembersSet("store"); Assert.assertEquals(new HashSet<String>(Arrays.asList("1","2","3","4")), r... | public Long unionStore(String key, String... keys) { return getJedis().sunionstore(key, keys); } | RedisSet extends Commands { public Long unionStore(String key, String... keys) { return getJedis().sunionstore(key, keys); } } | RedisSet extends Commands { public Long unionStore(String key, String... keys) { return getJedis().sunionstore(key, keys); } private RedisSet(); } | RedisSet extends Commands { public Long unionStore(String key, String... keys) { return getJedis().sunionstore(key, keys); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String... | RedisSet extends Commands { public Long unionStore(String key, String... keys) { return getJedis().sunionstore(key, keys); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String... |
@Test public void testDiff() throws Exception { redisSet.save("1","1","2","3","5"); redisSet.save("2","2","3","4","6"); redisSet.save("3","1","4"); Set<String> result = redisSet.diff("1","2","3"); Assert.assertEquals(new HashSet<String>(Arrays.asList("5")), result); redisSet.deleteKey("1","2"); } | public Set<String> diff(String... keys) { return getJedis().sdiff(keys); } | RedisSet extends Commands { public Set<String> diff(String... keys) { return getJedis().sdiff(keys); } } | RedisSet extends Commands { public Set<String> diff(String... keys) { return getJedis().sdiff(keys); } private RedisSet(); } | RedisSet extends Commands { public Set<String> diff(String... keys) { return getJedis().sdiff(keys); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String pop(String key); Set<... | RedisSet extends Commands { public Set<String> diff(String... keys) { return getJedis().sdiff(keys); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String pop(String key); Set<... |
@Test public void testDiffStore() throws Exception { redisSet.save("1","1","2","3","5"); redisSet.save("2","2","3","4","6"); redisSet.save("3","1","4"); Long num = redisSet.diffStore("store","1","2","3"); System.out.println(num); Set<String> result = redisSet.getMembersSet("store"); Assert.assertEquals(new HashSet<Stri... | public Long diffStore(String key, String... keys) { return getJedis().sdiffstore(key, keys); } | RedisSet extends Commands { public Long diffStore(String key, String... keys) { return getJedis().sdiffstore(key, keys); } } | RedisSet extends Commands { public Long diffStore(String key, String... keys) { return getJedis().sdiffstore(key, keys); } private RedisSet(); } | RedisSet extends Commands { public Long diffStore(String key, String... keys) { return getJedis().sdiffstore(key, keys); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String p... | RedisSet extends Commands { public Long diffStore(String key, String... keys) { return getJedis().sdiffstore(key, keys); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMembersSet(String key); String p... |
@Test public void testMoveMember() throws Exception { redisSet.save("1","2","3"); redisSet.save("2","2"); Long re = redisSet.moveMember("1", "2", "3"); System.out.println(re); Set<String> results = redisSet.getMembersSet("2"); Assert.assertEquals(new HashSet<String>(Arrays.asList("2","3")),results); redisSet.deleteKey(... | public Long moveMember(String fromKey, String toKey, String member) { return getJedis().smove(fromKey, toKey, member); } | RedisSet extends Commands { public Long moveMember(String fromKey, String toKey, String member) { return getJedis().smove(fromKey, toKey, member); } } | RedisSet extends Commands { public Long moveMember(String fromKey, String toKey, String member) { return getJedis().smove(fromKey, toKey, member); } private RedisSet(); } | RedisSet extends Commands { public Long moveMember(String fromKey, String toKey, String member) { return getJedis().smove(fromKey, toKey, member); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMember... | RedisSet extends Commands { public Long moveMember(String fromKey, String toKey, String member) { return getJedis().smove(fromKey, toKey, member); } private RedisSet(); synchronized static RedisSet getInstance(); Long save(String key, String... member); Long remove(String key, String... members); Set<String> getMember... |
@Test public void testMaxId() throws ReadConfigException { int maxId = PropertyFile.getMaxId(); System.out.println(maxId); assert(maxId>=1000); } | public static int getMaxId() throws ReadConfigException { String maxId; try { props = getProperties(Configs.PROPERTY_FILE); maxId = props.getString(Configs.MAX_POOL_ID); if (maxId == null) { save(Configs.MAX_POOL_ID, Configs.START_ID + ""); props = getProperties(Configs.PROPERTY_FILE); maxId = props.getString(Configs.M... | PropertyFile { public static int getMaxId() throws ReadConfigException { String maxId; try { props = getProperties(Configs.PROPERTY_FILE); maxId = props.getString(Configs.MAX_POOL_ID); if (maxId == null) { save(Configs.MAX_POOL_ID, Configs.START_ID + ""); props = getProperties(Configs.PROPERTY_FILE); maxId = props.getS... | PropertyFile { public static int getMaxId() throws ReadConfigException { String maxId; try { props = getProperties(Configs.PROPERTY_FILE); maxId = props.getString(Configs.MAX_POOL_ID); if (maxId == null) { save(Configs.MAX_POOL_ID, Configs.START_ID + ""); props = getProperties(Configs.PROPERTY_FILE); maxId = props.getS... | PropertyFile { public static int getMaxId() throws ReadConfigException { String maxId; try { props = getProperties(Configs.PROPERTY_FILE); maxId = props.getString(Configs.MAX_POOL_ID); if (maxId == null) { save(Configs.MAX_POOL_ID, Configs.START_ID + ""); props = getProperties(Configs.PROPERTY_FILE); maxId = props.getS... | PropertyFile { public static int getMaxId() throws ReadConfigException { String maxId; try { props = getProperties(Configs.PROPERTY_FILE); maxId = props.getString(Configs.MAX_POOL_ID); if (maxId == null) { save(Configs.MAX_POOL_ID, Configs.START_ID + ""); props = getProperties(Configs.PROPERTY_FILE); maxId = props.getS... |
@Test public void testAdd() throws Exception { redisSortSet.save(key,3.3,"one"); redisSortSet.save(key,5.3,"two"); Long result = redisSortSet.save(key, 2.12, "member"); show(); Assert.assertEquals((Long)1L, result); } | public Long save(String key, Double score, String member) { return getJedis().zadd(key, score, member); } | RedisSortSet extends Commands { public Long save(String key, Double score, String member) { return getJedis().zadd(key, score, member); } } | RedisSortSet extends Commands { public Long save(String key, Double score, String member) { return getJedis().zadd(key, score, member); } private RedisSortSet(); } | RedisSortSet extends Commands { public Long save(String key, Double score, String member) { return getJedis().zadd(key, score, member); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double score(Strin... | RedisSortSet extends Commands { public Long save(String key, Double score, String member) { return getJedis().zadd(key, score, member); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double score(Strin... |
@Test public void testIndex() throws Exception { redisSortSet.save(key, 2.12, "members"); redisSortSet.save(key, 2.52, "member"); redisSortSet.save(key, 2.02, "member"); Long result = redisSortSet.index(key, "member"); show(); Assert.assertEquals((Long)0L, result); } | public Long index(String key, String member) { return getJedis().zrank(key, member); } | RedisSortSet extends Commands { public Long index(String key, String member) { return getJedis().zrank(key, member); } } | RedisSortSet extends Commands { public Long index(String key, String member) { return getJedis().zrank(key, member); } private RedisSortSet(); } | RedisSortSet extends Commands { public Long index(String key, String member) { return getJedis().zrank(key, member); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double score(String key, String membe... | RedisSortSet extends Commands { public Long index(String key, String member) { return getJedis().zrank(key, member); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double score(String key, String membe... |
@Test public void testScore() throws Exception { redisSortSet.save(key, 2.52, "member"); Double result = redisSortSet.score(key, "member"); show(); Assert.assertEquals((Double)2.52, result); } | public Double score(String key, String member) { return getJedis().zscore(key, member); } | RedisSortSet extends Commands { public Double score(String key, String member) { return getJedis().zscore(key, member); } } | RedisSortSet extends Commands { public Double score(String key, String member) { return getJedis().zscore(key, member); } private RedisSortSet(); } | RedisSortSet extends Commands { public Double score(String key, String member) { return getJedis().zscore(key, member); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double score(String key, String me... | RedisSortSet extends Commands { public Double score(String key, String member) { return getJedis().zscore(key, member); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double score(String key, String me... |
@Test public void testRank() throws Exception { redisSortSet.save(key, 2.52, "member"); redisSortSet.save(key, 2.52, "members"); Long result = redisSortSet.rank(key, "member"); Assert.assertEquals((Long)1L, result); } | public Long rank(String key, String member) { return getJedis().zrevrank(key, member); } | RedisSortSet extends Commands { public Long rank(String key, String member) { return getJedis().zrevrank(key, member); } } | RedisSortSet extends Commands { public Long rank(String key, String member) { return getJedis().zrevrank(key, member); } private RedisSortSet(); } | RedisSortSet extends Commands { public Long rank(String key, String member) { return getJedis().zrevrank(key, member); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double score(String key, String mem... | RedisSortSet extends Commands { public Long rank(String key, String member) { return getJedis().zrevrank(key, member); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double score(String key, String mem... |
@Test public void testRangeByIndex() throws Exception { redisSortSet.save(key,2.3,"a"); redisSortSet.save(key,2.3,"b"); redisSortSet.save(key,2.1,"c"); Set<String> result = redisSortSet.rangeByIndex(key, 0L, 1L); for(String s:result){ System.out.println(s); } show(); Assert.assertEquals(new HashSet<String>(Arrays.asLis... | public Set<String> rangeByIndex(String key, long start, long end) { return getJedis().zrevrange(key, start, end); } | RedisSortSet extends Commands { public Set<String> rangeByIndex(String key, long start, long end) { return getJedis().zrevrange(key, start, end); } } | RedisSortSet extends Commands { public Set<String> rangeByIndex(String key, long start, long end) { return getJedis().zrevrange(key, start, end); } private RedisSortSet(); } | RedisSortSet extends Commands { public Set<String> rangeByIndex(String key, long start, long end) { return getJedis().zrevrange(key, start, end); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double s... | RedisSortSet extends Commands { public Set<String> rangeByIndex(String key, long start, long end) { return getJedis().zrevrange(key, start, end); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double s... |
@Test public void testRangeByScore() throws Exception { redisSortSet.save(key,2.3,"a"); redisSortSet.save(key,2.3,"b"); redisSortSet.save(key,2.1,"c"); Set<String> result = redisSortSet.rangeByScore(key, 0d, 2.2d); for(String s:result){ System.out.println(s); } show(); Assert.assertEquals(new HashSet<String>(Arrays.asL... | public Set<String> rangeByScore(String key, Double min, Double max) { return getJedis().zrevrangeByScore(key, max, min); } | RedisSortSet extends Commands { public Set<String> rangeByScore(String key, Double min, Double max) { return getJedis().zrevrangeByScore(key, max, min); } } | RedisSortSet extends Commands { public Set<String> rangeByScore(String key, Double min, Double max) { return getJedis().zrevrangeByScore(key, max, min); } private RedisSortSet(); } | RedisSortSet extends Commands { public Set<String> rangeByScore(String key, Double min, Double max) { return getJedis().zrevrangeByScore(key, max, min); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); D... | RedisSortSet extends Commands { public Set<String> rangeByScore(String key, Double min, Double max) { return getJedis().zrevrangeByScore(key, max, min); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); D... |
@Test public void testInterStore() throws Exception { redisSortSet.save(key,1.1,"a"); redisSortSet.save(key,1.1,"b"); redisSortSet.save("key1",1.1,"b"); redisSortSet.save("key1",1.1,"a"); redisSortSet.save("key2",1.1,"a"); redisSortSet.save(key,1.1,"t"); Long result = redisSortSet.interStore("desKey", key,"key1"); show... | public Long interStore(String desKey, String... fromKey) { return getJedis().zinterstore(desKey, fromKey); } | RedisSortSet extends Commands { public Long interStore(String desKey, String... fromKey) { return getJedis().zinterstore(desKey, fromKey); } } | RedisSortSet extends Commands { public Long interStore(String desKey, String... fromKey) { return getJedis().zinterstore(desKey, fromKey); } private RedisSortSet(); } | RedisSortSet extends Commands { public Long interStore(String desKey, String... fromKey) { return getJedis().zinterstore(desKey, fromKey); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double score(St... | RedisSortSet extends Commands { public Long interStore(String desKey, String... fromKey) { return getJedis().zinterstore(desKey, fromKey); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double score(St... |
@Test public void testIncrease() throws Exception { redisSortSet.save(key,1.1,"member"); Double result = redisSortSet.increase(key, 1.1, "member"); show(); Assert.assertEquals((Double)2.2d, result); } | public Double increase(String key, Double score, String member) { return getJedis().zincrby(key, score, member); } | RedisSortSet extends Commands { public Double increase(String key, Double score, String member) { return getJedis().zincrby(key, score, member); } } | RedisSortSet extends Commands { public Double increase(String key, Double score, String member) { return getJedis().zincrby(key, score, member); } private RedisSortSet(); } | RedisSortSet extends Commands { public Double increase(String key, Double score, String member) { return getJedis().zincrby(key, score, member); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double sc... | RedisSortSet extends Commands { public Double increase(String key, Double score, String member) { return getJedis().zincrby(key, score, member); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double sc... |
@Test public void testRemove() throws Exception { redisSortSet.save(key,1.1,"value"); Long result = redisSortSet.remove(key, "value"); show(); Assert.assertEquals((Long)1L, result); } | public Long remove(String key, String... value) { return getJedis().zrem(key, value); } | RedisSortSet extends Commands { public Long remove(String key, String... value) { return getJedis().zrem(key, value); } } | RedisSortSet extends Commands { public Long remove(String key, String... value) { return getJedis().zrem(key, value); } private RedisSortSet(); } | RedisSortSet extends Commands { public Long remove(String key, String... value) { return getJedis().zrem(key, value); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double score(String key, String memb... | RedisSortSet extends Commands { public Long remove(String key, String... value) { return getJedis().zrem(key, value); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double score(String key, String memb... |
@Test public void testRemoveByRank() throws Exception { redisSortSet.save(key,2.3,"a"); redisSortSet.save(key,2.3,"b"); redisSortSet.save(key,2.1,"c"); redisSortSet.save(key,2.3,"d"); redisSortSet.save(key,2.3,"r"); redisSortSet.save(key,2.1,"u"); Long result = redisSortSet.removeByRank(key, 0L, 1L); show(); Assert.ass... | public Long removeByRank(String key, long start, long end) { return getJedis().zremrangeByRank(key, start, end); } | RedisSortSet extends Commands { public Long removeByRank(String key, long start, long end) { return getJedis().zremrangeByRank(key, start, end); } } | RedisSortSet extends Commands { public Long removeByRank(String key, long start, long end) { return getJedis().zremrangeByRank(key, start, end); } private RedisSortSet(); } | RedisSortSet extends Commands { public Long removeByRank(String key, long start, long end) { return getJedis().zremrangeByRank(key, start, end); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double sc... | RedisSortSet extends Commands { public Long removeByRank(String key, long start, long end) { return getJedis().zremrangeByRank(key, start, end); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double sc... |
@Test public void testList() throws Exception { Map<String,RedisPoolProperty> map = PropertyFile.getAllPoolConfig(); for(String key:map.keySet()){ System.out.println(">> "+key+" <<"); RedisPoolProperty property = map.get(key); Map lists= MythReflect.getFieldsValue(property); for(Object keys:lists.keySet()){ System.out.... | public static Map<String,RedisPoolProperty> getAllPoolConfig() throws ReadConfigException { Map<String,RedisPoolProperty> map = new HashMap<>(); int maxId; try { maxId = getMaxId(); props = getProperties(Configs.PROPERTY_FILE); } catch (IOException e) { e.printStackTrace(); logger.error(ExceptionInfo.OPEN_CONFIG_FAILED... | PropertyFile { public static Map<String,RedisPoolProperty> getAllPoolConfig() throws ReadConfigException { Map<String,RedisPoolProperty> map = new HashMap<>(); int maxId; try { maxId = getMaxId(); props = getProperties(Configs.PROPERTY_FILE); } catch (IOException e) { e.printStackTrace(); logger.error(ExceptionInfo.OPE... | PropertyFile { public static Map<String,RedisPoolProperty> getAllPoolConfig() throws ReadConfigException { Map<String,RedisPoolProperty> map = new HashMap<>(); int maxId; try { maxId = getMaxId(); props = getProperties(Configs.PROPERTY_FILE); } catch (IOException e) { e.printStackTrace(); logger.error(ExceptionInfo.OPE... | PropertyFile { public static Map<String,RedisPoolProperty> getAllPoolConfig() throws ReadConfigException { Map<String,RedisPoolProperty> map = new HashMap<>(); int maxId; try { maxId = getMaxId(); props = getProperties(Configs.PROPERTY_FILE); } catch (IOException e) { e.printStackTrace(); logger.error(ExceptionInfo.OPE... | PropertyFile { public static Map<String,RedisPoolProperty> getAllPoolConfig() throws ReadConfigException { Map<String,RedisPoolProperty> map = new HashMap<>(); int maxId; try { maxId = getMaxId(); props = getProperties(Configs.PROPERTY_FILE); } catch (IOException e) { e.printStackTrace(); logger.error(ExceptionInfo.OPE... |
@Test public void testRemoveByScore() throws Exception { redisSortSet.save(key,2.3,"a"); redisSortSet.save(key,2.3,"b"); redisSortSet.save(key,2.1,"c"); redisSortSet.save(key,1.9,"d"); redisSortSet.save(key,2.0,"r"); redisSortSet.save(key,2.1,"u"); Long result = redisSortSet.removeByScore(key, 1.9d, 2.1d); Assert.asser... | public Long removeByScore(String key, Double min, Double max) { return getJedis().zremrangeByScore(key, min, max); } | RedisSortSet extends Commands { public Long removeByScore(String key, Double min, Double max) { return getJedis().zremrangeByScore(key, min, max); } } | RedisSortSet extends Commands { public Long removeByScore(String key, Double min, Double max) { return getJedis().zremrangeByScore(key, min, max); } private RedisSortSet(); } | RedisSortSet extends Commands { public Long removeByScore(String key, Double min, Double max) { return getJedis().zremrangeByScore(key, min, max); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double ... | RedisSortSet extends Commands { public Long removeByScore(String key, Double min, Double max) { return getJedis().zremrangeByScore(key, min, max); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double ... |
@Test public void testSize() throws Exception { redisSortSet.save(key,2.3,"a"); redisSortSet.save(key,2.3,"b"); redisSortSet.save(key,2.1,"c"); Long result = redisSortSet.size(key); show(); Assert.assertEquals((Long)3L, result); } | public Long size(String key) { return getJedis().zcard(key); } | RedisSortSet extends Commands { public Long size(String key) { return getJedis().zcard(key); } } | RedisSortSet extends Commands { public Long size(String key) { return getJedis().zcard(key); } private RedisSortSet(); } | RedisSortSet extends Commands { public Long size(String key) { return getJedis().zcard(key); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double score(String key, String member); Long rank(String key... | RedisSortSet extends Commands { public Long size(String key) { return getJedis().zcard(key); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double score(String key, String member); Long rank(String key... |
@Test public void testCount() throws Exception { redisSortSet.save(key,2.3,"a"); redisSortSet.save(key,2.3,"b"); redisSortSet.save(key,2.1,"c"); Long result = redisSortSet.count(key, 2.1,2.2); show(); Assert.assertEquals((Long)1L, result); } | public Long count(String key, double min, double max) { return getJedis().zcount(key, min, max); } | RedisSortSet extends Commands { public Long count(String key, double min, double max) { return getJedis().zcount(key, min, max); } } | RedisSortSet extends Commands { public Long count(String key, double min, double max) { return getJedis().zcount(key, min, max); } private RedisSortSet(); } | RedisSortSet extends Commands { public Long count(String key, double min, double max) { return getJedis().zcount(key, min, max); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double score(String key, ... | RedisSortSet extends Commands { public Long count(String key, double min, double max) { return getJedis().zcount(key, min, max); } private RedisSortSet(); synchronized static RedisSortSet getInstance(); Long save(String key, Double score, String member); Long index(String key, String member); Double score(String key, ... |
@Test public void createData1(){ for(int i=0;i<5000;i++){ redisKey.set("aaa"+i,"dfdfdfdf"); } } | public String set(String key, String value) { return getJedis().set(key, value); } | RedisKey extends Commands { public String set(String key, String value) { return getJedis().set(key, value); } } | RedisKey extends Commands { public String set(String key, String value) { return getJedis().set(key, value); } private RedisKey(); } | RedisKey extends Commands { public String set(String key, String value) { return getJedis().set(key, value); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value); Str... | RedisKey extends Commands { public String set(String key, String value) { return getJedis().set(key, value); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value); Str... |
@Test public void createData2(){ for(int i=0;i<5000;i++){ redisKey.set("qq"+i,"dfdfdfdf"); } } | public String set(String key, String value) { return getJedis().set(key, value); } | RedisKey extends Commands { public String set(String key, String value) { return getJedis().set(key, value); } } | RedisKey extends Commands { public String set(String key, String value) { return getJedis().set(key, value); } private RedisKey(); } | RedisKey extends Commands { public String set(String key, String value) { return getJedis().set(key, value); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value); Str... | RedisKey extends Commands { public String set(String key, String value) { return getJedis().set(key, value); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value); Str... |
@Test public void createData3(){ for(int i=0;i<5000;i++){ redisKey.set("pp"+i,"dfdfdfdf"); } } | public String set(String key, String value) { return getJedis().set(key, value); } | RedisKey extends Commands { public String set(String key, String value) { return getJedis().set(key, value); } } | RedisKey extends Commands { public String set(String key, String value) { return getJedis().set(key, value); } private RedisKey(); } | RedisKey extends Commands { public String set(String key, String value) { return getJedis().set(key, value); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value); Str... | RedisKey extends Commands { public String set(String key, String value) { return getJedis().set(key, value); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value); Str... |
@Test public void testStatus(){ Map<String,String> map = redisKey.getStatus(); System.out.println(map.get("db0")); } | public String get(String key) { Jedis jedis = getJedis(); if ("string".equals(jedis.type(key))) { return jedis.get(key); } else { logger.error(ExceptionInfo.KEY_TYPE_NOT_STRING + " and type is " + jedis.type(key)); return null; } } | RedisKey extends Commands { public String get(String key) { Jedis jedis = getJedis(); if ("string".equals(jedis.type(key))) { return jedis.get(key); } else { logger.error(ExceptionInfo.KEY_TYPE_NOT_STRING + " and type is " + jedis.type(key)); return null; } } } | RedisKey extends Commands { public String get(String key) { Jedis jedis = getJedis(); if ("string".equals(jedis.type(key))) { return jedis.get(key); } else { logger.error(ExceptionInfo.KEY_TYPE_NOT_STRING + " and type is " + jedis.type(key)); return null; } } private RedisKey(); } | RedisKey extends Commands { public String get(String key) { Jedis jedis = getJedis(); if ("string".equals(jedis.type(key))) { return jedis.get(key); } else { logger.error(ExceptionInfo.KEY_TYPE_NOT_STRING + " and type is " + jedis.type(key)); return null; } } private RedisKey(); synchronized static RedisKey getInstanc... | RedisKey extends Commands { public String get(String key) { Jedis jedis = getJedis(); if ("string".equals(jedis.type(key))) { return jedis.get(key); } else { logger.error(ExceptionInfo.KEY_TYPE_NOT_STRING + " and type is " + jedis.type(key)); return null; } } private RedisKey(); synchronized static RedisKey getInstanc... |
@Test public void testDump() throws Exception { byte[] result = redisKey.dump(key); Assert.assertArrayEquals(null, result); } | public byte[] dump(String key) { return getJedis().dump(key); } | RedisKey extends Commands { public byte[] dump(String key) { return getJedis().dump(key); } } | RedisKey extends Commands { public byte[] dump(String key) { return getJedis().dump(key); } private RedisKey(); } | RedisKey extends Commands { public byte[] dump(String key) { return getJedis().dump(key); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value); String setExpireMs(Str... | RedisKey extends Commands { public byte[] dump(String key) { return getJedis().dump(key); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value); String setExpireMs(Str... |
@Test public void testSetExpire() throws Exception { Long result = redisKey.setExpire(key, 0, "value"); assert(1L == result); } | public Long setExpire(String key, int second, String value) { Jedis jedis = getJedis(); jedis.set(key, value); return expire(key, second); } | RedisKey extends Commands { public Long setExpire(String key, int second, String value) { Jedis jedis = getJedis(); jedis.set(key, value); return expire(key, second); } } | RedisKey extends Commands { public Long setExpire(String key, int second, String value) { Jedis jedis = getJedis(); jedis.set(key, value); return expire(key, second); } private RedisKey(); } | RedisKey extends Commands { public Long setExpire(String key, int second, String value) { Jedis jedis = getJedis(); jedis.set(key, value); return expire(key, second); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key);... | RedisKey extends Commands { public Long setExpire(String key, int second, String value) { Jedis jedis = getJedis(); jedis.set(key, value); return expire(key, second); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key);... |
@Test public void testSetExpireMs() throws Exception { String result = redisKey.setExpireMs(key, 12L, "value"); Assert.assertEquals("OK", result); } | public String setExpireMs(String key, long second, String value) { return getJedis().psetex(key, second, value); } | RedisKey extends Commands { public String setExpireMs(String key, long second, String value) { return getJedis().psetex(key, second, value); } } | RedisKey extends Commands { public String setExpireMs(String key, long second, String value) { return getJedis().psetex(key, second, value); } private RedisKey(); } | RedisKey extends Commands { public String setExpireMs(String key, long second, String value) { return getJedis().psetex(key, second, value); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key... | RedisKey extends Commands { public String setExpireMs(String key, long second, String value) { return getJedis().psetex(key, second, value); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key... |
@Test public void testCreateRedisPool() throws Exception { String result = poolManagement.createRedisPool(property); RedisPoolProperty getObject = RedisPoolProperty.initByIdFromConfig(result); Assert.assertEquals(getObject.toString(), property.toString()); } | public String createRedisPool(RedisPoolProperty property) throws Exception { int maxId = PropertyFile.getMaxId(); maxId++; property.setPoolId(maxId + ""); Map<String, ?> map = MythReflect.getFieldsValue(property); for (String key : map.keySet()) { PropertyFile.save(maxId + Configs.SEPARATE + key, map.get(key) + ""); } ... | PoolManagement { public String createRedisPool(RedisPoolProperty property) throws Exception { int maxId = PropertyFile.getMaxId(); maxId++; property.setPoolId(maxId + ""); Map<String, ?> map = MythReflect.getFieldsValue(property); for (String key : map.keySet()) { PropertyFile.save(maxId + Configs.SEPARATE + key, map.g... | PoolManagement { public String createRedisPool(RedisPoolProperty property) throws Exception { int maxId = PropertyFile.getMaxId(); maxId++; property.setPoolId(maxId + ""); Map<String, ?> map = MythReflect.getFieldsValue(property); for (String key : map.keySet()) { PropertyFile.save(maxId + Configs.SEPARATE + key, map.g... | PoolManagement { public String createRedisPool(RedisPoolProperty property) throws Exception { int maxId = PropertyFile.getMaxId(); maxId++; property.setPoolId(maxId + ""); Map<String, ?> map = MythReflect.getFieldsValue(property); for (String key : map.keySet()) { PropertyFile.save(maxId + Configs.SEPARATE + key, map.g... | PoolManagement { public String createRedisPool(RedisPoolProperty property) throws Exception { int maxId = PropertyFile.getMaxId(); maxId++; property.setPoolId(maxId + ""); Map<String, ?> map = MythReflect.getFieldsValue(property); for (String key : map.keySet()) { PropertyFile.save(maxId + Configs.SEPARATE + key, map.g... |
@Test public void testIncreaseKey() throws Exception { redisKey.set(key,"1"); long result = redisKey.increaseKey(key); Assert.assertEquals(2L, result); testDeleteKey(); } | public long increaseKey(String key) throws TypeErrorException { checkIntValue(key); return getJedis().incr(key); } | RedisKey extends Commands { public long increaseKey(String key) throws TypeErrorException { checkIntValue(key); return getJedis().incr(key); } } | RedisKey extends Commands { public long increaseKey(String key) throws TypeErrorException { checkIntValue(key); return getJedis().incr(key); } private RedisKey(); } | RedisKey extends Commands { public long increaseKey(String key) throws TypeErrorException { checkIntValue(key); return getJedis().incr(key); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key... | RedisKey extends Commands { public long increaseKey(String key) throws TypeErrorException { checkIntValue(key); return getJedis().incr(key); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key... |
@Test public void testDecreaseKey() throws Exception { redisKey.set(key,"1"); long result = redisKey.decreaseKey(key); Assert.assertEquals(0L, result); testDeleteKey(); } | public long decreaseKey(String key) throws TypeErrorException { checkIntValue(key); return getJedis().decr(key); } | RedisKey extends Commands { public long decreaseKey(String key) throws TypeErrorException { checkIntValue(key); return getJedis().decr(key); } } | RedisKey extends Commands { public long decreaseKey(String key) throws TypeErrorException { checkIntValue(key); return getJedis().decr(key); } private RedisKey(); } | RedisKey extends Commands { public long decreaseKey(String key) throws TypeErrorException { checkIntValue(key); return getJedis().decr(key); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key... | RedisKey extends Commands { public long decreaseKey(String key) throws TypeErrorException { checkIntValue(key); return getJedis().decr(key); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key... |
@Test public void testAppend() throws Exception { redisKey.set(key,"1"); long result = redisKey.append(key, "value"); Assert.assertEquals(6L, result); } | public long append(String key, String value) { return getJedis().append(key, value); } | RedisKey extends Commands { public long append(String key, String value) { return getJedis().append(key, value); } } | RedisKey extends Commands { public long append(String key, String value) { return getJedis().append(key, value); } private RedisKey(); } | RedisKey extends Commands { public long append(String key, String value) { return getJedis().append(key, value); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value);... | RedisKey extends Commands { public long append(String key, String value) { return getJedis().append(key, value); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value);... |
@Test public void testGetMultiKeys() throws Exception { redisKey.set(key,"1"); redisKey.set("1","2"); List<String> result = redisKey.getMultiKeys(key,"1"); Assert.assertEquals(Arrays.<String>asList("1","2"), result); testDeleteKey(); redisKey.deleteKey("1"); } | public List<String> getMultiKeys(String... keys) { return getJedis().mget(keys); } | RedisKey extends Commands { public List<String> getMultiKeys(String... keys) { return getJedis().mget(keys); } } | RedisKey extends Commands { public List<String> getMultiKeys(String... keys) { return getJedis().mget(keys); } private RedisKey(); } | RedisKey extends Commands { public List<String> getMultiKeys(String... keys) { return getJedis().mget(keys); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value); Str... | RedisKey extends Commands { public List<String> getMultiKeys(String... keys) { return getJedis().mget(keys); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value); Str... |
@Test public void testSetMultiKey() throws Exception { String result = redisKey.setMultiKey("keys","a",key,"b"); Assert.assertEquals("OK", result); List<String> results = redisKey.getMultiKeys(key,"keys"); Assert.assertEquals(Arrays.<String>asList("b","a"), results); testDeleteKey(); redisKey.deleteKey("keys"); } | public String setMultiKey(String... keys) { return getJedis().mset(keys); } | RedisKey extends Commands { public String setMultiKey(String... keys) { return getJedis().mset(keys); } } | RedisKey extends Commands { public String setMultiKey(String... keys) { return getJedis().mset(keys); } private RedisKey(); } | RedisKey extends Commands { public String setMultiKey(String... keys) { return getJedis().mset(keys); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value); String set... | RedisKey extends Commands { public String setMultiKey(String... keys) { return getJedis().mset(keys); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value); String set... |
@Test public void testGetEncoding() throws Exception { redisKey.set(key,"78.89"); String result = redisKey.getEncoding(key); Assert.assertEquals("embstr", result); testDeleteKey(); } | public String getEncoding(String key) { return getJedis().objectEncoding(key); } | RedisKey extends Commands { public String getEncoding(String key) { return getJedis().objectEncoding(key); } } | RedisKey extends Commands { public String getEncoding(String key) { return getJedis().objectEncoding(key); } private RedisKey(); } | RedisKey extends Commands { public String getEncoding(String key) { return getJedis().objectEncoding(key); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value); Strin... | RedisKey extends Commands { public String getEncoding(String key) { return getJedis().objectEncoding(key); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value); Strin... |
@Test public void testListKey(){ Set<String> sets = redisKey.listAllKeys(redisKey.getDb()); for(String d:sets){ System.out.println(d); } System.out.println(sets.size()); } | public Set<String> listAllKeys(int db) { logger.debug("RedisKey Management:" + this.getPools()); setDb(db); return getJedis().keys("*"); } | RedisKey extends Commands { public Set<String> listAllKeys(int db) { logger.debug("RedisKey Management:" + this.getPools()); setDb(db); return getJedis().keys("*"); } } | RedisKey extends Commands { public Set<String> listAllKeys(int db) { logger.debug("RedisKey Management:" + this.getPools()); setDb(db); return getJedis().keys("*"); } private RedisKey(); } | RedisKey extends Commands { public Set<String> listAllKeys(int db) { logger.debug("RedisKey Management:" + this.getPools()); setDb(db); return getJedis().keys("*"); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); L... | RedisKey extends Commands { public Set<String> listAllKeys(int db) { logger.debug("RedisKey Management:" + this.getPools()); setDb(db); return getJedis().keys("*"); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); L... |
@Test public void testType() throws Exception { redisKey.set(key,"12"); String result = redisKey.type(key); Assert.assertEquals("string", result); } | public String set(String key, String value) { return getJedis().set(key, value); } | RedisKey extends Commands { public String set(String key, String value) { return getJedis().set(key, value); } } | RedisKey extends Commands { public String set(String key, String value) { return getJedis().set(key, value); } private RedisKey(); } | RedisKey extends Commands { public String set(String key, String value) { return getJedis().set(key, value); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value); Str... | RedisKey extends Commands { public String set(String key, String value) { return getJedis().set(key, value); } private RedisKey(); synchronized static RedisKey getInstance(); String get(String key); String set(String key, String value); byte[] dump(String key); Long setExpire(String key, int second, String value); Str... |
@Test public void testSave() throws Exception { redisHash.save(key,"member","value"); Long result = redisHash.save(key, "member", "value2"); show(); Assert.assertEquals((Long)0L, result); } | public Long save(String key, String member, String value) { return getJedis().hset(key, member, value); } | RedisHash extends Commands { public Long save(String key, String member, String value) { return getJedis().hset(key, member, value); } } | RedisHash extends Commands { public Long save(String key, String member, String value) { return getJedis().hset(key, member, value); } private RedisHash(); } | RedisHash extends Commands { public Long save(String key, String member, String value) { return getJedis().hset(key, member, value); } private RedisHash(); synchronized static RedisHash getInstance(); Long save(String key, String member, String value); String save(String key, Map<String, String> map); Long saveWhenNot... | RedisHash extends Commands { public Long save(String key, String member, String value) { return getJedis().hset(key, member, value); } private RedisHash(); synchronized static RedisHash getInstance(); Long save(String key, String member, String value); String save(String key, Map<String, String> map); Long saveWhenNot... |
@Test public void testSave2() throws Exception { redisHash.save(key,"String","value"); String result = redisHash.save(key, new HashMap<String, String>() {{ put("String", "String"); put("String1","12"); }}); show(); Assert.assertEquals("OK", result); } | public Long save(String key, String member, String value) { return getJedis().hset(key, member, value); } | RedisHash extends Commands { public Long save(String key, String member, String value) { return getJedis().hset(key, member, value); } } | RedisHash extends Commands { public Long save(String key, String member, String value) { return getJedis().hset(key, member, value); } private RedisHash(); } | RedisHash extends Commands { public Long save(String key, String member, String value) { return getJedis().hset(key, member, value); } private RedisHash(); synchronized static RedisHash getInstance(); Long save(String key, String member, String value); String save(String key, Map<String, String> map); Long saveWhenNot... | RedisHash extends Commands { public Long save(String key, String member, String value) { return getJedis().hset(key, member, value); } private RedisHash(); synchronized static RedisHash getInstance(); Long save(String key, String member, String value); String save(String key, Map<String, String> map); Long saveWhenNot... |
@Test public void testCreateRedisPoolAndConnection() throws Exception { RedisPools result = poolManagement.createRedisPoolAndConnection(property); Jedis jedis = result.getJedis(); jedis.set("names","testCreateRedisPoolAndConnection"); Assert.assertEquals("testCreateRedisPoolAndConnection",jedis.get("names")); jedis.del... | public RedisPools createRedisPoolAndConnection(RedisPoolProperty property) throws Exception { return getRedisPool(createRedisPool(property)); } | PoolManagement { public RedisPools createRedisPoolAndConnection(RedisPoolProperty property) throws Exception { return getRedisPool(createRedisPool(property)); } } | PoolManagement { public RedisPools createRedisPoolAndConnection(RedisPoolProperty property) throws Exception { return getRedisPool(createRedisPool(property)); } private PoolManagement(); } | PoolManagement { public RedisPools createRedisPoolAndConnection(RedisPoolProperty property) throws Exception { return getRedisPool(createRedisPool(property)); } private PoolManagement(); synchronized static PoolManagement getInstance(); RedisPools getRedisPool(); RedisPools getRedisPool(String poolId); RedisPools crea... | PoolManagement { public RedisPools createRedisPoolAndConnection(RedisPoolProperty property) throws Exception { return getRedisPool(createRedisPool(property)); } private PoolManagement(); synchronized static PoolManagement getInstance(); RedisPools getRedisPool(); RedisPools getRedisPool(String poolId); RedisPools crea... |
@Test public void testSaveWhenNotExist() throws Exception { redisHash.save(key,"member","value"); Long result = redisHash.saveWhenNotExist(key, "member", "value2"); show(); Assert.assertEquals((Long)0L, result); } | public Long saveWhenNotExist(String key, String member, String value) { return getJedis().hsetnx(key, member, value); } | RedisHash extends Commands { public Long saveWhenNotExist(String key, String member, String value) { return getJedis().hsetnx(key, member, value); } } | RedisHash extends Commands { public Long saveWhenNotExist(String key, String member, String value) { return getJedis().hsetnx(key, member, value); } private RedisHash(); } | RedisHash extends Commands { public Long saveWhenNotExist(String key, String member, String value) { return getJedis().hsetnx(key, member, value); } private RedisHash(); synchronized static RedisHash getInstance(); Long save(String key, String member, String value); String save(String key, Map<String, String> map); Lo... | RedisHash extends Commands { public Long saveWhenNotExist(String key, String member, String value) { return getJedis().hsetnx(key, member, value); } private RedisHash(); synchronized static RedisHash getInstance(); Long save(String key, String member, String value); String save(String key, Map<String, String> map); Lo... |
@Test public void testGet() throws Exception { redisHash.save(key,"member","value"); String result = redisHash.get(key, "member"); show(); Assert.assertEquals("value", result); } | public String get(String key, String member) { return getJedis().hget(key, member); } | RedisHash extends Commands { public String get(String key, String member) { return getJedis().hget(key, member); } } | RedisHash extends Commands { public String get(String key, String member) { return getJedis().hget(key, member); } private RedisHash(); } | RedisHash extends Commands { public String get(String key, String member) { return getJedis().hget(key, member); } private RedisHash(); synchronized static RedisHash getInstance(); Long save(String key, String member, String value); String save(String key, Map<String, String> map); Long saveWhenNotExist(String key, St... | RedisHash extends Commands { public String get(String key, String member) { return getJedis().hget(key, member); } private RedisHash(); synchronized static RedisHash getInstance(); Long save(String key, String member, String value); String save(String key, Map<String, String> map); Long saveWhenNotExist(String key, St... |
@Test public void testGetMembers() throws Exception { redisHash.save(key,"member","value"); redisHash.save(key,"member2","value"); Set<String> result = redisHash.getMembers(key); show(); Assert.assertEquals(new HashSet(Arrays.asList("member","member2")), result); } | public Set<String> getMembers(String key) { return getJedis().hkeys(key); } | RedisHash extends Commands { public Set<String> getMembers(String key) { return getJedis().hkeys(key); } } | RedisHash extends Commands { public Set<String> getMembers(String key) { return getJedis().hkeys(key); } private RedisHash(); } | RedisHash extends Commands { public Set<String> getMembers(String key) { return getJedis().hkeys(key); } private RedisHash(); synchronized static RedisHash getInstance(); Long save(String key, String member, String value); String save(String key, Map<String, String> map); Long saveWhenNotExist(String key, String membe... | RedisHash extends Commands { public Set<String> getMembers(String key) { return getJedis().hkeys(key); } private RedisHash(); synchronized static RedisHash getInstance(); Long save(String key, String member, String value); String save(String key, Map<String, String> map); Long saveWhenNotExist(String key, String membe... |
@Test public void testGetValues() throws Exception { redisHash.save(key,"member","value"); redisHash.save(key,"member2","value"); List<String> result = redisHash.getValues(key); show(); Assert.assertEquals(Arrays.asList("value","value"), result); } | public List<String> getValues(String key) { return getJedis().hvals(key); } | RedisHash extends Commands { public List<String> getValues(String key) { return getJedis().hvals(key); } } | RedisHash extends Commands { public List<String> getValues(String key) { return getJedis().hvals(key); } private RedisHash(); } | RedisHash extends Commands { public List<String> getValues(String key) { return getJedis().hvals(key); } private RedisHash(); synchronized static RedisHash getInstance(); Long save(String key, String member, String value); String save(String key, Map<String, String> map); Long saveWhenNotExist(String key, String membe... | RedisHash extends Commands { public List<String> getValues(String key) { return getJedis().hvals(key); } private RedisHash(); synchronized static RedisHash getInstance(); Long save(String key, String member, String value); String save(String key, Map<String, String> map); Long saveWhenNotExist(String key, String membe... |
@Test public void testIncrease() throws Exception { redisHash.save(key,"member","34"); Long result = redisHash.increase(key, "member", 56L); show(); Assert.assertEquals((Long)90L, result); } | public Long increase(String key, String member, long value) throws TypeErrorException { Long result; try { result = getJedis().hincrBy(key, member, value); } catch (Exception e) { throw new TypeErrorException(ExceptionInfo.TYPE_ERROR, e, RedisHash.class); } return result; } | RedisHash extends Commands { public Long increase(String key, String member, long value) throws TypeErrorException { Long result; try { result = getJedis().hincrBy(key, member, value); } catch (Exception e) { throw new TypeErrorException(ExceptionInfo.TYPE_ERROR, e, RedisHash.class); } return result; } } | RedisHash extends Commands { public Long increase(String key, String member, long value) throws TypeErrorException { Long result; try { result = getJedis().hincrBy(key, member, value); } catch (Exception e) { throw new TypeErrorException(ExceptionInfo.TYPE_ERROR, e, RedisHash.class); } return result; } private RedisHa... | RedisHash extends Commands { public Long increase(String key, String member, long value) throws TypeErrorException { Long result; try { result = getJedis().hincrBy(key, member, value); } catch (Exception e) { throw new TypeErrorException(ExceptionInfo.TYPE_ERROR, e, RedisHash.class); } return result; } private RedisHa... | RedisHash extends Commands { public Long increase(String key, String member, long value) throws TypeErrorException { Long result; try { result = getJedis().hincrBy(key, member, value); } catch (Exception e) { throw new TypeErrorException(ExceptionInfo.TYPE_ERROR, e, RedisHash.class); } return result; } private RedisHa... |
@Test public void testIncreaseByFloat() throws Exception { redisHash.save(key,"member","1"); Double result = redisHash.increaseByFloat(key, "member", 22d); Assert.assertEquals((Double) 23.0, result); } | public Double increaseByFloat(String key, String member, double value) throws TypeErrorException { Double result; try { result = getJedis().hincrByFloat(key, member, value); } catch (Exception e) { throw new TypeErrorException(ExceptionInfo.TYPE_ERROR, e, RedisHash.class); } return result; } | RedisHash extends Commands { public Double increaseByFloat(String key, String member, double value) throws TypeErrorException { Double result; try { result = getJedis().hincrByFloat(key, member, value); } catch (Exception e) { throw new TypeErrorException(ExceptionInfo.TYPE_ERROR, e, RedisHash.class); } return result; ... | RedisHash extends Commands { public Double increaseByFloat(String key, String member, double value) throws TypeErrorException { Double result; try { result = getJedis().hincrByFloat(key, member, value); } catch (Exception e) { throw new TypeErrorException(ExceptionInfo.TYPE_ERROR, e, RedisHash.class); } return result; ... | RedisHash extends Commands { public Double increaseByFloat(String key, String member, double value) throws TypeErrorException { Double result; try { result = getJedis().hincrByFloat(key, member, value); } catch (Exception e) { throw new TypeErrorException(ExceptionInfo.TYPE_ERROR, e, RedisHash.class); } return result; ... | RedisHash extends Commands { public Double increaseByFloat(String key, String member, double value) throws TypeErrorException { Double result; try { result = getJedis().hincrByFloat(key, member, value); } catch (Exception e) { throw new TypeErrorException(ExceptionInfo.TYPE_ERROR, e, RedisHash.class); } return result; ... |
@Test public void testLength() throws Exception { redisHash.save(key,"member","23.2"); redisHash.save(key,"member1","23.2"); redisHash.save(key,"member2","23.2"); Long result = redisHash.length(key); show(); Assert.assertEquals((Long)3L, result); } | public Long length(String key) { return getJedis().hlen(key); } | RedisHash extends Commands { public Long length(String key) { return getJedis().hlen(key); } } | RedisHash extends Commands { public Long length(String key) { return getJedis().hlen(key); } private RedisHash(); } | RedisHash extends Commands { public Long length(String key) { return getJedis().hlen(key); } private RedisHash(); synchronized static RedisHash getInstance(); Long save(String key, String member, String value); String save(String key, Map<String, String> map); Long saveWhenNotExist(String key, String member, String va... | RedisHash extends Commands { public Long length(String key) { return getJedis().hlen(key); } private RedisHash(); synchronized static RedisHash getInstance(); Long save(String key, String member, String value); String save(String key, Map<String, String> map); Long saveWhenNotExist(String key, String member, String va... |
@Test public void testRemove() throws Exception { redisHash.save(key,"member","23.2"); Long result = redisHash.remove(key, "member"); show(); Assert.assertEquals((Long)1L, result); } | public Long remove(String key, String... members) { return getJedis().hdel(key, members); } | RedisHash extends Commands { public Long remove(String key, String... members) { return getJedis().hdel(key, members); } } | RedisHash extends Commands { public Long remove(String key, String... members) { return getJedis().hdel(key, members); } private RedisHash(); } | RedisHash extends Commands { public Long remove(String key, String... members) { return getJedis().hdel(key, members); } private RedisHash(); synchronized static RedisHash getInstance(); Long save(String key, String member, String value); String save(String key, Map<String, String> map); Long saveWhenNotExist(String k... | RedisHash extends Commands { public Long remove(String key, String... members) { return getJedis().hdel(key, members); } private RedisHash(); synchronized static RedisHash getInstance(); Long save(String key, String member, String value); String save(String key, Map<String, String> map); Long saveWhenNotExist(String k... |
@Test public void testGetRedisPool() throws Exception { RedisPools result = poolManagement.getRedisPool(); System.out.println(result.getDatabaseNum()); Jedis jedis = result.getJedis(); jedis.keys(""); jedis.set("names","testGetRedisPool"); Assert.assertEquals("testGetRedisPool",jedis.get("names")); } | public RedisPools getRedisPool() { if (currentPoolId == null) { logger.error(ExceptionInfo.NOT_EXIST_CURRENT_POOL); return null; } try { return getRedisPool(currentPoolId); } catch (Exception e) { logger.error(e.getMessage()); logger.debug(NoticeInfo.ERROR_INFO, e); return null; } } | PoolManagement { public RedisPools getRedisPool() { if (currentPoolId == null) { logger.error(ExceptionInfo.NOT_EXIST_CURRENT_POOL); return null; } try { return getRedisPool(currentPoolId); } catch (Exception e) { logger.error(e.getMessage()); logger.debug(NoticeInfo.ERROR_INFO, e); return null; } } } | PoolManagement { public RedisPools getRedisPool() { if (currentPoolId == null) { logger.error(ExceptionInfo.NOT_EXIST_CURRENT_POOL); return null; } try { return getRedisPool(currentPoolId); } catch (Exception e) { logger.error(e.getMessage()); logger.debug(NoticeInfo.ERROR_INFO, e); return null; } } private PoolManage... | PoolManagement { public RedisPools getRedisPool() { if (currentPoolId == null) { logger.error(ExceptionInfo.NOT_EXIST_CURRENT_POOL); return null; } try { return getRedisPool(currentPoolId); } catch (Exception e) { logger.error(e.getMessage()); logger.debug(NoticeInfo.ERROR_INFO, e); return null; } } private PoolManage... | PoolManagement { public RedisPools getRedisPool() { if (currentPoolId == null) { logger.error(ExceptionInfo.NOT_EXIST_CURRENT_POOL); return null; } try { return getRedisPool(currentPoolId); } catch (Exception e) { logger.error(e.getMessage()); logger.debug(NoticeInfo.ERROR_INFO, e); return null; } } private PoolManage... |
@Test public void testCheckConnection(){ property = new RedisPoolProperty(); property.setHost("120.25.203.47"); property.setMaxActive(400); property.setMaxIdle(100); property.setMaxWaitMills(10000); property.setTestOnBorrow(false); property.setName("myth"); property.setPort(6381); property.setPassword("myth"); property... | public boolean checkConnection(RedisPoolProperty property) { if (!validate(property)) { return false; } RedisPools pools = new RedisPools(); pools.setProperty(property); boolean flag = pools.available(); pools.destroyPool(); return flag; } | PoolManagement { public boolean checkConnection(RedisPoolProperty property) { if (!validate(property)) { return false; } RedisPools pools = new RedisPools(); pools.setProperty(property); boolean flag = pools.available(); pools.destroyPool(); return flag; } } | PoolManagement { public boolean checkConnection(RedisPoolProperty property) { if (!validate(property)) { return false; } RedisPools pools = new RedisPools(); pools.setProperty(property); boolean flag = pools.available(); pools.destroyPool(); return flag; } private PoolManagement(); } | PoolManagement { public boolean checkConnection(RedisPoolProperty property) { if (!validate(property)) { return false; } RedisPools pools = new RedisPools(); pools.setProperty(property); boolean flag = pools.available(); pools.destroyPool(); return flag; } private PoolManagement(); synchronized static PoolManagement g... | PoolManagement { public boolean checkConnection(RedisPoolProperty property) { if (!validate(property)) { return false; } RedisPools pools = new RedisPools(); pools.setProperty(property); boolean flag = pools.available(); pools.destroyPool(); return flag; } private PoolManagement(); synchronized static PoolManagement g... |
@Test public void emptyLaunchUrlLaunchesOnboarding() { LaunchData launchData = SplashUrlDecoder.getLaunchType(""); assertEquals(ONBOARDING, launchData.getLaunchType()); } | public static LaunchData getLaunchType(String launchUri) { if (launchUri == null) { launchUri = ""; } LaunchData data; if (launchUri.contains(ADD_ISSUER_PATH)) { data = handleAddIssuerUri(launchUri); if (data != null) { return data; } } else if (launchUri.contains(ADD_CERT_PATH)) { data = handleAddCertificateUri(launch... | SplashUrlDecoder { public static LaunchData getLaunchType(String launchUri) { if (launchUri == null) { launchUri = ""; } LaunchData data; if (launchUri.contains(ADD_ISSUER_PATH)) { data = handleAddIssuerUri(launchUri); if (data != null) { return data; } } else if (launchUri.contains(ADD_CERT_PATH)) { data = handleAddCe... | SplashUrlDecoder { public static LaunchData getLaunchType(String launchUri) { if (launchUri == null) { launchUri = ""; } LaunchData data; if (launchUri.contains(ADD_ISSUER_PATH)) { data = handleAddIssuerUri(launchUri); if (data != null) { return data; } } else if (launchUri.contains(ADD_CERT_PATH)) { data = handleAddCe... | SplashUrlDecoder { public static LaunchData getLaunchType(String launchUri) { if (launchUri == null) { launchUri = ""; } LaunchData data; if (launchUri.contains(ADD_ISSUER_PATH)) { data = handleAddIssuerUri(launchUri); if (data != null) { return data; } } else if (launchUri.contains(ADD_CERT_PATH)) { data = handleAddCe... | SplashUrlDecoder { public static LaunchData getLaunchType(String launchUri) { if (launchUri == null) { launchUri = ""; } LaunchData data; if (launchUri.contains(ADD_ISSUER_PATH)) { data = handleAddIssuerUri(launchUri); if (data != null) { return data; } } else if (launchUri.contains(ADD_CERT_PATH)) { data = handleAddCe... |
@Test public void blockcertsDirectAddCertificateUrlLaunchesCertificateFlow() { LaunchData launchData = SplashUrlDecoder.getLaunchType(BLOCKCERTS_DIRECT_ADD_CERTIFICATE_URL); assertEquals(ADD_CERTIFICATE, launchData.getLaunchType()); assertEquals("https: } | public static LaunchData getLaunchType(String launchUri) { if (launchUri == null) { launchUri = ""; } LaunchData data; if (launchUri.contains(ADD_ISSUER_PATH)) { data = handleAddIssuerUri(launchUri); if (data != null) { return data; } } else if (launchUri.contains(ADD_CERT_PATH)) { data = handleAddCertificateUri(launch... | SplashUrlDecoder { public static LaunchData getLaunchType(String launchUri) { if (launchUri == null) { launchUri = ""; } LaunchData data; if (launchUri.contains(ADD_ISSUER_PATH)) { data = handleAddIssuerUri(launchUri); if (data != null) { return data; } } else if (launchUri.contains(ADD_CERT_PATH)) { data = handleAddCe... | SplashUrlDecoder { public static LaunchData getLaunchType(String launchUri) { if (launchUri == null) { launchUri = ""; } LaunchData data; if (launchUri.contains(ADD_ISSUER_PATH)) { data = handleAddIssuerUri(launchUri); if (data != null) { return data; } } else if (launchUri.contains(ADD_CERT_PATH)) { data = handleAddCe... | SplashUrlDecoder { public static LaunchData getLaunchType(String launchUri) { if (launchUri == null) { launchUri = ""; } LaunchData data; if (launchUri.contains(ADD_ISSUER_PATH)) { data = handleAddIssuerUri(launchUri); if (data != null) { return data; } } else if (launchUri.contains(ADD_CERT_PATH)) { data = handleAddCe... | SplashUrlDecoder { public static LaunchData getLaunchType(String launchUri) { if (launchUri == null) { launchUri = ""; } LaunchData data; if (launchUri.contains(ADD_ISSUER_PATH)) { data = handleAddIssuerUri(launchUri); if (data != null) { return data; } } else if (launchUri.contains(ADD_CERT_PATH)) { data = handleAddCe... |
@Test public void hasCorrectDisplayOrder() { assertEquals(7, subject.getDisplayOrder().size()); assertEquals("group.date", subject.getDisplayOrder().get(1)); } | public List<String> getDisplayOrder() { return mDisplayOrder; } | Metadata { public List<String> getDisplayOrder() { return mDisplayOrder; } } | Metadata { public List<String> getDisplayOrder() { return mDisplayOrder; } Metadata(List<String> displayOrder, Map<String, JsonObject> groups, Map<String, GroupDef> groupDefinitions, List<Field> fields); } | Metadata { public List<String> getDisplayOrder() { return mDisplayOrder; } Metadata(List<String> displayOrder, Map<String, JsonObject> groups, Map<String, GroupDef> groupDefinitions, List<Field> fields); List<String> getDisplayOrder(); Map<String, JsonObject> getGroups(); Map<String, GroupDef> getGroupDefinitions(); Li... | Metadata { public List<String> getDisplayOrder() { return mDisplayOrder; } Metadata(List<String> displayOrder, Map<String, JsonObject> groups, Map<String, GroupDef> groupDefinitions, List<Field> fields); List<String> getDisplayOrder(); Map<String, JsonObject> getGroups(); Map<String, GroupDef> getGroupDefinitions(); Li... |
@Test public void hasCorrectStringField() { Field field = subject.getFields().get(0); assertEquals("Text title", field.getTitle()); assertEquals("string", field.getValue()); } | public List<Field> getFields() { return mFields; } | Metadata { public List<Field> getFields() { return mFields; } } | Metadata { public List<Field> getFields() { return mFields; } Metadata(List<String> displayOrder, Map<String, JsonObject> groups, Map<String, GroupDef> groupDefinitions, List<Field> fields); } | Metadata { public List<Field> getFields() { return mFields; } Metadata(List<String> displayOrder, Map<String, JsonObject> groups, Map<String, GroupDef> groupDefinitions, List<Field> fields); List<String> getDisplayOrder(); Map<String, JsonObject> getGroups(); Map<String, GroupDef> getGroupDefinitions(); List<Field> get... | Metadata { public List<Field> getFields() { return mFields; } Metadata(List<String> displayOrder, Map<String, JsonObject> groups, Map<String, GroupDef> groupDefinitions, List<Field> fields); List<String> getDisplayOrder(); Map<String, JsonObject> getGroups(); Map<String, GroupDef> getGroupDefinitions(); List<Field> get... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.