method2testcases stringlengths 118 6.63k |
|---|
### Question:
ConfigPv implements Comparable<ConfigPv> { @Override public boolean equals(Object other) { if(other instanceof ConfigPv) { ConfigPv otherConfigPv = (ConfigPv)other; return Objects.equals(pvName, otherConfigPv.getPvName()) && Objects.equals(readbackPvName, otherConfigPv.getReadbackPvName()) && Objects.equa... |
### Question:
ConfigPv implements Comparable<ConfigPv> { @Override public int hashCode() { return Objects.hash(pvName, readbackPvName, readOnly); } @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); @Override int compareTo(ConfigPv other); }### Answer:
@Test public void tes... |
### Question:
PropertyManager { public void setDesiredNumberOfFeaturesPerRunner(int desiredNumberOfFeaturesPerRunner) { this.desiredNumberOfFeaturesPerRunner = desiredNumberOfFeaturesPerRunner; } @Inject PropertyManager(final CucableLogger logger, final FileIO fileIO); String getSourceRunnerTemplateFile(); void setSou... |
### Question:
PropertyManager { public void setParallelizationMode(final String parallelizationMode) throws CucablePluginException { try { this.parallelizationMode = ParallelizationMode.valueOf(parallelizationMode.toUpperCase()); } catch (IllegalArgumentException e) { throw new CucablePluginException( "Unknown <paralle... |
### Question:
PropertyManager { public void checkForMissingMandatoryProperties() throws CucablePluginException { List<String> missingProperties = new ArrayList<>(); if (sourceFeatures == null || sourceFeatures.isEmpty()) { saveMissingProperty("", "<sourceFeatures>", missingProperties); } saveMissingProperty(sourceRunne... |
### Question:
CucableLogger { public void info(final CharSequence logString, CucableLogLevel... cucableLogLevels) { log(LogLevel.INFO, logString, cucableLogLevels); } void initialize(final Log mojoLogger, final String currentLogLevel); void logInfoSeparator(final CucableLogLevel... cucableLogLevels); void info(final C... |
### Question:
CucableLogger { public void logInfoSeparator(final CucableLogLevel... cucableLogLevels) { info("-------------------------------------", cucableLogLevels); } void initialize(final Log mojoLogger, final String currentLogLevel); void logInfoSeparator(final CucableLogLevel... cucableLogLevels); void info(fin... |
### Question:
GherkinTranslations { String getScenarioKeyword(final String language) { GherkinDialect dialect; try { dialect = gherkinDialectProvider.getDialect(language, null); } catch (Exception e) { return SCENARIO; } return dialect.getScenarioKeywords().get(0); } @Inject GherkinTranslations(); }### Answer:
@Test... |
### Question:
GherkinDocumentParser { private String replacePlaceholderInString( final String sourceString, final Map<String, List<String>> exampleMap, final int rowIndex) { String result = sourceString; Matcher m = SCENARIO_OUTLINE_PLACEHOLDER_PATTERN.matcher(sourceString); while (m.find()) { String currentPlaceholder... |
### Question:
GherkinDocumentParser { private DataTable replaceDataTableExamplePlaceholder( final DataTable dataTable, final Map<String, List<String>> exampleMap, final int rowIndex ) { if (dataTable == null) { return null; } List<List<String>> dataTableRows = dataTable.getRows(); DataTable replacedDataTable = new Data... |
### Question:
GherkinToCucableConverter { List<com.trivago.vo.Step> convertGherkinStepsToCucableSteps(final List<Step> gherkinSteps) { List<com.trivago.vo.Step> steps = new ArrayList<>(); for (Step gherkinStep : gherkinSteps) { com.trivago.vo.Step step; com.trivago.vo.DataTable dataTable = null; String docString = null... |
### Question:
GherkinToCucableConverter { Map<String, List<String>> convertGherkinExampleTableToCucableExampleMap( final Examples exampleTable ) { Map<String, List<String>> exampleMap; List<TableCell> headerCells = exampleTable.getTableHeader().getCells(); exampleMap = headerCells.stream().collect( Collectors.toMap(hea... |
### Question:
FeatureFileContentRenderer { private String formatDataTableString(final DataTable dataTable) { if (dataTable == null) { return ""; } char dataTableSeparator = '|'; StringBuilder dataTableStringBuilder = new StringBuilder(); for (List<String> rowValues : dataTable.getRows()) { dataTableStringBuilder.append... |
### Question:
FeatureFileContentRenderer { private String formatDocString(final String docString) { if (docString == null || docString.isEmpty()) { return ""; } return "\"\"\"" + LINE_SEPARATOR + docString + LINE_SEPARATOR + "\"\"\"" + LINE_SEPARATOR; } }### Answer:
@Test public void formatDocStringTest() { String e... |
### Question:
CucablePlugin extends AbstractMojo { public void execute() throws CucablePluginException { logger.initialize(getLog(), logLevel); propertyManager.setSourceRunnerTemplateFile(sourceRunnerTemplateFile); propertyManager.setGeneratedRunnerDirectory(generatedRunnerDirectory); propertyManager.setSourceFeatures(... |
### Question:
FileIO { public void writeContentToFile(String content, String filePath) throws FileCreationException { try { FileUtils.fileWrite(filePath, "UTF-8", content); } catch (IOException e) { throw new FileCreationException(filePath); } } void writeContentToFile(String content, String filePath); String readCont... |
### Question:
FileIO { public String readContentFromFile(String filePath) throws MissingFileException { try { return FileUtils.fileRead(filePath, "UTF-8"); } catch (IOException e) { throw new MissingFileException(filePath); } } void writeContentToFile(String content, String filePath); String readContentFromFile(String... |
### Question:
FileSystemManager { public void prepareGeneratedFeatureAndRunnerDirectories() throws CucablePluginException { createDirIfNotExists(propertyManager.getGeneratedFeatureDirectory()); removeFilesFromPath(propertyManager.getGeneratedFeatureDirectory(), "feature"); createDirIfNotExists(propertyManager.getGenera... |
### Question:
FileSystemManager { public List<Path> getPathsFromCucableFeature(final CucableFeature cucableFeature) throws CucablePluginException { if (cucableFeature == null) { return Collections.emptyList(); } String sourceFeatures = cucableFeature.getName(). replace("file: File sourceFeaturesFile = new File(sourceFe... |
### Question:
PropertyManager { public void setGeneratedRunnerDirectory(final String generatedRunnerDirectory) { this.generatedRunnerDirectory = generatedRunnerDirectory; } @Inject PropertyManager(final CucableLogger logger, final FileIO fileIO); String getSourceRunnerTemplateFile(); void setSourceRunnerTemplateFile(f... |
### Question:
PropertyManager { public void setGeneratedFeatureDirectory(final String generatedFeatureDirectory) { this.generatedFeatureDirectory = generatedFeatureDirectory; } @Inject PropertyManager(final CucableLogger logger, final FileIO fileIO); String getSourceRunnerTemplateFile(); void setSourceRunnerTemplateFi... |
### Question:
PropertyManager { public void setDesiredNumberOfRunners(final int desiredNumberOfRunners) { this.desiredNumberOfRunners = desiredNumberOfRunners; } @Inject PropertyManager(final CucableLogger logger, final FileIO fileIO); String getSourceRunnerTemplateFile(); void setSourceRunnerTemplateFile(final String... |
### Question:
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)) ... |
### Question:
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(), color... |
### Question:
LogFilterApplier { public String apply(String text, String logLevel) { if (System.getProperties().containsKey(OFF_SWITCH)) { return text; } boolean displayDebugInfo = showDebugInfo(); if (config == null) config = configLoader.loadConfiguration(displayDebugInfo); String result = text; if (displayDebugInfo)... |
### Question:
RemoveLogLevelFilter implements LogEntryFilter { @Override public String filter(Context context) { if (context.config.isRemoveLogLevel()) { String text = context.entryText; text = text.replace("[" + context.logLevel + "] ", ""); text = text.replace("[" + context.logLevel.toLowerCase() + "] ", ""); return ... |
### Question:
AddTimestampFilter implements LogEntryFilter { @Override public String filter(Context context) { StringBuilder builder = new StringBuilder(); if (isPatternProvided(context)) { builder.append(formatter(context).format(new Date())); builder.append(" "); } builder.append(context.entryText); return builder.to... |
### Question:
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: t... |
### Question:
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 co... |
### Question:
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... |
### Question:
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);... |
### Question:
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_P... |
### Question:
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 get... |
### Question:
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> ... |
### Question:
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 Li... |
### Question:
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 = f... |
### Question:
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": fie... |
### Question:
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(); }### Answer:
@Test public void getTime() throws Exception { S... |
### Question:
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(); }### Answer:
@Test public void getDateTime() t... |
### Question:
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(E... |
### Question:
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(); }### Answer:
@Test public void testDate(){ System.out.println(... |
### Question:
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... va... |
### Question:
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... va... |
### Question:
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... va... |
### Question:
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... va... |
### Question:
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 k... |
### Question:
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 k... |
### Question:
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.... |
### Question:
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 k... |
### Question:
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)... |
### Question:
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_... |
### Question:
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 ke... |
### Question:
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 ... |
### Question:
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...... |
### Question:
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... |
### Question:
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, Str... |
### Question:
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)... |
### Question:
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); S... |
### Question:
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... |
### Question:
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 ... |
### Question:
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 +... |
### Question:
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); Se... |
### Question:
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... |
### Question:
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... |
### Question:
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(S... |
### Question:
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(Strin... |
### Question:
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(S... |
### Question:
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(Strin... |
### Question:
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(Str... |
### Question:
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 ... |
### Question:
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<Str... |
### Question:
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); maxI... |
### Question:
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); Doub... |
### Question:
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... |
### Question:
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 ... |
### Question:
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 k... |
### Question:
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 mem... |
### Question:
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, Str... |
### Question:
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); D... |
### Question:
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 memb... |
### Question:
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 ke... |
### Question:
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 memb... |
### Question:
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(Exc... |
### Question:
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 me... |
### Question:
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 r... |
### Question:
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 scor... |
### Question:
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, Stri... |
### Question:
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 Redis... |
### Question:
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 s... |
### Question:
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[] dum... |
### Question:
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 setExp... |
### Question:
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.SEPARAT... |
### Question:
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 setExp... |
### Question:
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 setExp... |
### Question:
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, ... |
### Question:
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, Stri... |
### Question:
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 valu... |
### Question:
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... |
### Question:
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(... |
### Question:
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); Lo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.