name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
druid_CalciteMySqlNodeVisitor_convertToSingleValuesIfNeed_rdh
/** * If there are multiple VALUES, and all values in VALUES CLAUSE are literal, * convert the value clauses to a single value clause. ...
3.26
druid_DruidStatManagerFacade_mergWallStat_rdh
/** * * @return * @deprecated */ public static Map mergWallStat(Map mapA, Map mapB) { return mergeWallStat(mapA, mapB); } @SuppressWarnings({ "rawtypes", "unchecked" }
3.26
druid_DruidDataSourceWrapper_setMaxEvictableIdleTimeMillis_rdh
/** * Ignore the 'maxEvictableIdleTimeMillis &lt; minEvictableIdleTimeMillis' validate, * it will be validated again in {@link DruidDataSource#init()}. * <p> * for fix issue #3084, #2763 * * @since 1.1.14 */ @Override public void setMaxEvictableIdleTimeMillis(long maxEvictableIdleTimeMillis) { try { super.setMax...
3.26
druid_AntsparkOutputVisitor_visit_rdh
// add using statment @Override public boolean visit(AntsparkCreateTableStatement x) { print0(ucase ? "CREATE " : "create "); if (x.isExternal()) {print0(ucase ? "EXTERNAL " : "external ");} if (x.isIfNotExists()) { print0(ucase ? "TABLE IF NOT EXISTS " : "table if not exists "); } else { ...
3.26
druid_TableStat_getDataType_rdh
/** * * @since 1.0.20 */ public String getDataType() { return dataType; }
3.26
druid_TableStat_setDataType_rdh
/** * * @since 1.0.20 */ public void setDataType(String dataType) { this.dataType = dataType; }
3.26
druid_DataSourceSelectorEnum_newInstance_rdh
/** * Create a new instance of the DataSourceSelector represented by this enum. * * @return null if dataSource is not given or exception occurred while creating new instance */ public DataSourceSelector newInstance(HighAvailableDataSource dataSource) { if (dataSource == null) { LOG.warn("You should provide an ins...
3.26
druid_PagerUtils_getLimit_rdh
/** * * @param sql * @param dbType * @return if not exists limit, return -1; */ public static int getLimit(String sql, DbType dbType) { List<SQLStatement> stmtList = SQLUtils.parseStatements(sql, dbType); if (stmtList.size() != 1) { return -1; } SQLStatement stmt = stmtList.get(0); ...
3.26
druid_DruidPooledConnection_getPhysicalConnectNanoSpan_rdh
/** * * @since 1.0.17 */ public long getPhysicalConnectNanoSpan() { return this.holder.getCreateNanoSpan(); }
3.26
druid_DruidPooledConnection_getPhysicalConnectionUsedCount_rdh
/** * * @since 1.0.17 */ public long getPhysicalConnectionUsedCount() { return this.holder.getUseCount();}
3.26
druid_DruidPooledConnection_getGloablVariables_rdh
/** * * @since 1.0.28 */ public Map<String, Object> getGloablVariables() { return this.holder.globalVariables; }
3.26
druid_DruidPooledConnection_getConnectNotEmptyWaitNanos_rdh
/** * * @since 1.0.17 */ public long getConnectNotEmptyWaitNanos() { return this.holder.getLastNotEmptyWaitNanos(); }
3.26
druid_DruidPooledConnection_prepareCall_rdh
// //////////////////// @Override public CallableStatement prepareCall(String sql) throws SQLException { checkState(); PreparedStatementHolder stmtHolder = null; PreparedStatementKey key = new PreparedStatementKey(sql, getCatalog(), MethodType.Precall_1);boolean poolPreparedStatements = holder.isPoolPreparedStatements(...
3.26
druid_DruidPooledConnection_getVariables_rdh
/** * * @since 1.0.28 */ public Map<String, Object> getVariables() { return this.holder.variables; }
3.26
druid_DruidAbstractDataSource_setConnectTimeout_rdh
/** * * @since 1.2.12 */ public void setConnectTimeout(int milliSeconds) { this.connectTimeout = milliSeconds; this.connectTimeoutStr = null; }
3.26
druid_DruidAbstractDataSource_isInitExceptionThrow_rdh
/** * * @since 1.1.11 */ public boolean isInitExceptionThrow() { return initExceptionThrow; }
3.26
druid_DruidAbstractDataSource_getSocketTimeout_rdh
/** * * @since 1.2.12 */ public int getSocketTimeout() { return socketTimeout; }
3.26
druid_DruidAbstractDataSource_getConnectTimeout_rdh
/** * * @since 1.2.12 */public int getConnectTimeout() { return connectTimeout; }
3.26
druid_DruidAbstractDataSource_setQueryTimeout_rdh
/** * Sets the number of seconds the driver will wait for a <code>Statement</code> object to execute to the given * number of seconds. If the limit is exceeded, an <code>SQLException</code> is thrown. A JDBC driver must apply * this limit to the <code>execute</code>, <code>executeQuery</code> and <code>executeUpdate...
3.26
druid_DruidAbstractDataSource_setNumTestsPerEvictionRun_rdh
/** * * @param numTestsPerEvictionRun */ @Deprecated public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) { this.numTestsPerEvictionRun = numTestsPerEvictionRun; }
3.26
druid_DruidAbstractDataSource_testConnectionInternal_rdh
/** * * @deprecated */ protected boolean testConnectionInternal(Connection conn) { return testConnectionInternal(null, conn); }
3.26
druid_DruidAbstractDataSource_setExceptionSorterClassName_rdh
// 兼容JBOSS public void setExceptionSorterClassName(String exceptionSorter) throws Exception { this.setExceptionSorter(exceptionSorter); }
3.26
druid_DruidAbstractDataSource_setInitExceptionThrow_rdh
/** * * @since 1.1.11 */ public void setInitExceptionThrow(boolean initExceptionThrow) { this.initExceptionThrow = initExceptionThrow; }
3.26
druid_DruidAbstractDataSource_setSocketTimeout_rdh
/** * * @since 1.2.12 */ public void setSocketTimeout(int milliSeconds) { this.socketTimeout = milliSeconds; this.socketTimeoutSr = null; }
3.26
druid_SQLCreateTableStatement_apply_rdh
// SQLAlterTableRenameColumn private boolean apply(SQLAlterTableRenameColumn item) { int columnIndex = columnIndexOf(item.getColumn()); if (columnIndex == (-1)) { return false; } SQLColumnDefinition column = ((SQLColumnDefinition) (tableElementList.get(columnIndex))); column.setName(item.getTo().clone()); return true;...
3.26
druid_SQLCreateTableStatement_isUNI_rdh
/** * only for show columns */ public boolean isUNI(String columnName) { for (SQLTableElement element : this.tableElementList) { if (element instanceof MySqlUnique) { MySqlUnique unique = ((MySqlUnique) (element)); if (unique.getColumns().isEmpty()) {continue; } SQLExpr column = unique.getColumns().get(0).getExpr()...
3.26
druid_SQLCreateTableStatement_isExternal_rdh
// for odps & hive public boolean isExternal() { return external; }
3.26
druid_SQLCreateTableStatement_isMUL_rdh
/** * only for show columns */ public boolean isMUL(String columnName) { for (SQLTableElement element : this.tableElementList) { if (element instanceof MySqlUnique) { MySqlUnique unique = ((MySqlUnique) (element)); SQLExpr v34 = unique.getColumns().get(0).getExpr(); if ((v34 instanceof SQLIdentifierExpr) && SQLUtils...
3.26
druid_HighAvailableDataSource_getPoolPurgeIntervalSeconds_rdh
// Getters & Setters public int getPoolPurgeIntervalSeconds() { return poolPurgeIntervalSeconds; }
3.26
druid_ZookeeperNodeListener_init_rdh
/** * Init a PathChildrenCache to watch the given path. */ @Override public void init() { checkParameters(); super.init(); if (client == null) { client = CuratorFrameworkFactory.builder().canBeReadOnly(true).connectionTimeoutMs(5000).connectString(zkConnectString).retryPolicy(new RetryForever(1000...
3.26
druid_ZookeeperNodeListener_refresh_rdh
/** * Build Properties from PathChildrenCache. * Should be called after init(). * * @see #getPropertiesFromCache() */ @Override public List<NodeEvent> refresh() { lock.lock();try { Properties properties = m0(); List<NodeEvent> events = NodeEvent.getEventsByDiffProperties(getProperties(), proper...
3.26
druid_AntsparkCreateTableStatement_getDatasource_rdh
/** * Getter method for property datasource. * * @return property value of datasource */ public SQLExprTableSource getDatasource() {return f0; }
3.26
druid_IPRange_getIPAddress_rdh
// ------------------------------------------------------------------------- /** * Return the encapsulated IP address. * * @return The IP address. */ public final IPAddress getIPAddress() {return ipAddress; }
3.26
druid_IPRange_parseRange_rdh
// ------------------------------------------------------------------------- /** * Parse the IP range string representation. * * @param range * String representation of the IP range. * @throws IllegalArgumentException * Throws this exception if the specified range is not a valid IP network range. */ final vo...
3.26
druid_IPRange_computeMaskFromNetworkPrefix_rdh
// ------------------------------------------------------------------------- /** * Convert a extended network prefix integer into an IP number. * * @param prefix * The network prefix number. * @return Return the IP number corresponding to the extended network prefix. */ private IPAddress computeMaskFromNetworkP...
3.26
druid_DruidDataSourceBuilder_build_rdh
/** * For issue #1796, use Spring Environment by specify configuration properties prefix to build DruidDataSource. * <p> * 这是为了兼容 Spring Boot 1.X 中 .properties 内配置属性不能按照配置声明顺序进行绑定,进而导致配置出错(issue #1796 )而提供的方法。 * 如果你不存在上述问题或者使用 .yml 进行配置则不必使用该方法,使用上面的{@link DruidDataSourceBuilder#build}即可,Spring Boot 2.0 修复了该问题,该方法届...
3.26
druid_PropertiesUtils_loadProperties_rdh
/** * Load properties from the given file into Properties. */ public static Properties loadProperties(String file) { Properties properties = new Properties(); if (file == null) { return properties; } InputStream is = null; try { LOG.debug(("Trying to load " + file) + " from FileSys...
3.26
druid_RandomDataSourceValidateThread_logSuccessTime_rdh
/** * Provide a static method to record the last success time of a DataSource */ public static void logSuccessTime(DataSourceProxy dataSource) { if ((dataSource != null) && (!StringUtils.isEmpty(dataSource.getName()))) { String name = dataSource.getName(); long time = S...
3.26
druid_Resources_classForName_rdh
/** * Loads a class * * @param className * - the class to load * @return The loaded class * @throws ClassNotFoundException * If the class cannot be found (duh!) */ public static Class<?> classForName(String className) throws ClassNotFoundException { Class<?> clazz = null; try {clazz = getClassLoader...
3.26
druid_Resources_getDefaultClassLoader_rdh
/** * Returns the default classloader (may be null). * * @return The default classloader */ public static ClassLoader getDefaultClassLoader() { return defaultClassLoader;}
3.26
druid_SQLColumnDefinition_setIdentity_rdh
// for sqlserver public void setIdentity(Identity identity) { if (identity != null) { identity.setParent(this); } this.identity = identity; }
3.26
druid_ListDG_print_rdh
/* 打印矩阵队列图 */ public void print() { System.out.printf("== List Graph:\n"); for (int v25 = 0; v25 < mVexs.size(); v25++) { System.out.printf("%d(%c): ", v25, mVexs.get(v25).data);ENode node = mVexs.get(v25).firstEdge; while (node != null) { System.out.printf("%d(%c) ", node.ivex, mVe...
3.26
druid_ListDG_BFS_rdh
/* 广度优先搜索(类似于树的层次遍历) */ public void BFS() { int head = 0; int rear = 0; int[] queue = new int[mVexs.size()]; // 辅组队列 boolean[] visited = new boolean[mVexs.size()];// 顶点访问标记 for (int i = 0; i < mVexs.size(); i++) { visited[i] = false; } for (int i = 0; i < mVexs.size(); i++) ...
3.26
druid_ListDG_DFS_rdh
/* 深度优先搜索遍历图 */ public void DFS() { boolean[] v13 = new boolean[mVexs.size()];// 顶点访问标记 // 初始化所有顶点都没有被访问 for (int i = 0; i < mVexs.size(); i++) { v13[i] = false; } for (int i = 0; i < mVexs.size(); i++) { if (...
3.26
druid_ListDG_getPosition_rdh
/* 返回ch位置 */ private int getPosition(Object ch) { for (int i = 0; i < mVexs.size(); i++) { if (mVexs.get(i).data == ch) { return i; } } return -1; }
3.26
druid_ListDG_linkLast_rdh
/* 将node节点链接到list的最后 */ private void linkLast(ENode list, ENode node) { ENode p = list; while (p.nextEdge != null) { p = p.nextEdge; } p.nextEdge = node; }
3.26
druid_Base64_base64toInt_rdh
/** * Translates the specified character, which is assumed to be in the "Base 64 Alphabet" into its equivalent 6-bit * positive integer. * * @throw IllegalArgumentException or ArrayOutOfBoundsException if c is not in the Base64 Alphabet. */ private static int base64toInt(char c, byte[] alphaToInt) { int resul...
3.26
druid_Base64_byteArrayToBase64_rdh
/** * Translates the specified byte array into a Base64 string as per Preferences.put(byte[]). */ public static String byteArrayToBase64(byte[] a) { return byteArrayToBase64(a, false);}
3.26
druid_Base64_byteArrayToAltBase64_rdh
/** * Translates the specified byte array into an "alternate representation" Base64 string. This non-standard variant * uses an alphabet that does not contain the uppercase alphabetic characters, which makes it suitable for use in * situations where case-folding occurs. */ public static String byteArrayToAltBase64(...
3.26
druid_Utils_murmurhash2_64_rdh
/** * murmur hash 2.0, The murmur hash is a relatively fast hash function from http://murmurhash.googlepages.com/ for * platforms with efficient multiplication. * * @author Viliam Holub */public static long murmurhash2_64(final byte[] data, int length, int seed) { final long m = 0xc6a4a7935bd1e995L; ...
3.26
druid_SpringIbatisBeanTypeAutoProxyCreator_getAdvicesAndAdvisorsForBean_rdh
/** * Identify as bean to proxy if the bean name is in the configured list of names. */ @SuppressWarnings("rawtypes") protected Object[] getAdvicesAndAdvisorsForBean(Class beanClass, String beanName, TargetSource targetSource) { for (String mappedName : this.beanNames) { if (FactoryBean.class.is...
3.26
druid_SpringIbatisBeanTypeAutoProxyCreator_isMatch_rdh
/** * Return if the given bean name matches the mapped name. * <p> * The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. Can be * overridden in subclasses. * * @param beanName * the bean name to check * @param mappedName * the name in the configured list of...
3.26
druid_SQLStatementParser_parseStatement_rdh
/** * * @param tryBest * - 为true去解析并忽略之后的错误 * 强制建议除非明确知道可以忽略才传tryBest=true, * 不然会忽略语法错误,且截断sql,导致update和delete无where条件下执行!!! */ public SQLStatement parseStatement(final boolean tryBest) { List<SQLStatement> list = new ArrayList<SQLStatement>(); this.parseStatementList(list, 1, null); if (tryBest) { if (lex...
3.26
druid_EncodingConvertFilter_preparedStatement_setString_rdh
// ========== preparedStatement @Override public void preparedStatement_setString(FilterChain chain, PreparedStatementProxy statement, int parameterIndex, String x) throws SQLException { super.preparedStatement_setString(chain, statement, parameterIndex, encode(statement.getConnectionProxy(), x)); }
3.26
druid_EncodingConvertFilter_connection_prepareCall_rdh
// / precall @Override public CallableStatementProxy connection_prepareCall(FilterChain chain, ConnectionProxy connection, String sql) throws SQLException { return super.connection_prepareCall(chain, connection, encode(connection, sql)); }
3.26
druid_EncodingConvertFilter_m2_rdh
// ///////////// callableStatement_ @Override public void m2(FilterChain chain, CallableStatementProxy statement, String parameterName, Reader reader) throws SQLException { String text = Utils.read(reader);Reader encodeReader = new StringReader(encode(statement.getConnectionProxy(), text)); super.callableStatement_set...
3.26
druid_EncodingConvertFilter_m0_rdh
// nativeSQL @Override public String m0(FilterChain chain, ConnectionProxy connection, String sql) throws SQLException { String encodedSql = encode(connection, sql); return super.connection_nativeSQL(chain, connection, encodedSql); }
3.26
druid_EncodingConvertFilter_connection_prepareStatement_rdh
// //////////////// Connection @Override public PreparedStatementProxy connection_prepareStatement(FilterChain chain, ConnectionProxy connection, String sql) throws SQLException { return super.connection_prepareStatement(chain, connection, encode(connection, sql)); }
3.26
druid_EncodingConvertFilter_decodeObject_rdh
// /////////// public Object decodeObject(ConnectionProxy connection, Object object) throws SQLException { if (object instanceof String) { return decode(connection, ((String) (object))); } if (object instanceof Reader) {Reader reader = ((Reader) (object)); String text = U...
3.26
druid_EncodingConvertFilter_statement_addBatch_rdh
// ////////////// statement @Override public void statement_addBatch(FilterChain chain, StatementProxy statement, String sql) throws SQLException { super.statement_addBatch(chain, statement, encode(statement.getConnectionProxy(), sql)); }
3.26
druid_EncodingConvertFilter_clob_position_rdh
// ////////// @Override public long clob_position(FilterChain chain, ClobProxy wrapper, String searchstr, long start) throws SQLException { return chain.clob_position(wrapper, encode(wrapper.getConnectionWrapper(), searchstr), start); }
3.26
druid_HexBin_decode_rdh
/** * Decode hex string to a byte array * * @param encoded * encoded string * @return return array of byte to encode */ public static byte[] decode(String encoded) { if (encoded == null) { return null; } int lengthData = encoded.length(); if ((lengthData % 2) != 0) { return null; } char[] binaryData = encoded....
3.26
druid_BlinkStatementParser_getSQLCreateTableParser_rdh
// // public H2SelectParser createSQLSelectParser() { // return new H2SelectParser(this.exprParser, selectListCache); // } public SQLCreateTableParser getSQLCreateTableParser() { return new BlinkCreateTableParser(this.exprParser); }
3.26
all7c_createServer_createServer_rdh
/** * Only the server that implements servlet container * could support something like @Context injection of servlet objects. */ public class RestServerFactory {public RestProtocolServer createServer(String name) { return new NettyHttpRestServer(); } }
3.26
hmily_HmilyTacDatasourceConfig_dataSource_rdh
/** * Data source data source. * * @return the data source */ @Bean @Primary public DataSource dataSource() { HikariDataSource hikariDataSource = new HikariDataSource(); hikariDataSource.setJdbcUrl(dataSourceProperties.getUrl()); hikariDataSource.setDriverClassName(dataSourceProperties.getDriverClassNam...
3.26
hmily_HmilyActionEnum_acquireByCode_rdh
/** * Acquire by code tcc action enum. * * @param code * the code * @return the tcc action enum */ public static HmilyActionEnum acquireByCode(final int code) { return Arrays.stream(HmilyActionEnum.values()).filter(v -> Objects.equals(v.getCode(), code)).findFirst().orElse(HmilyActionEnum.TRYING); }
3.26
hmily_HmilySelectStatement_getWhere_rdh
/** * Get where. * * @return where segment */public Optional<HmilyWhereSegment> getWhere() { return Optional.ofNullable(where); }
3.26
hmily_HmilyLockManager_tryAcquireLocks_rdh
/** * Try acquire locks. * * @param hmilyLocks * hmily locks */ // TODO add timeout mechanism in future public void tryAcquireLocks(final Collection<HmilyLock> hmilyLocks) { Set<String> existedHmilyLockIds = new HashSet<>(); for (HmilyLock each : hmilyLocks) { Optional<HmilyLock> hmilyLock = ...
3.26
hmily_HmilyLockManager_releaseLocks_rdh
/** * Release locks. * * @param hmilyLocks * hmily locks */ public void releaseLocks(final Collection<HmilyLock> hmilyLocks) { HmilyRepositoryStorage.releaseHmilyLocks(hmilyLocks); hmilyLocks.forEach(lock -> HmilyLockCacheManager.getInstance().removeByKey(lock.getLockId())); log.debug("TAC-release-l...
3.26
hmily_HmilyLockManager_checkLocks_rdh
/** * Check locks. * * @param hmilyLocks * hmily locks */ public void checkLocks(final Collection<HmilyLock> hmilyLocks) { if (CollectionUtils.isEmpty(hmilyLocks)) { return; } for (HmilyLock lock : hmilyLocks) { Optional<HmilyLock> hmilyLock...
3.26
hmily_NetUtils_getLocalIp_rdh
/** * Gets local ip. * * @return the local ip */ public static String getLocalIp() { if (localAddress == null) { synchronized(NetUtils.class) { if (localAddress == null) { try { localAddress = InetAddress.getLocalHost().getHostAddress(); ...
3.26
hmily_IndexMetaDataLoader_load_rdh
/** * Load index meta data list. * In a few jdbc implementation(eg. oracle), return value of getIndexInfo contains a statistics record that not a index itself and INDEX_NAME is null. * * @param connection * connection * @param table * table name * @return index meta data list * @throws SQLException * SQ...
3.26
hmily_HmilyRepositoryEvent_clear_rdh
/** * help gc. */ public void clear() { hmilyTransaction = null; hmilyParticipant = null; hmilyParticipantUndo = null; hmilyLocks = null; transId = null; }
3.26
hmily_HmilySQLServerDeleteStatement_getWithSegment_rdh
/** * Get with segment. * * @return with segment. */ public Optional<HmilyWithSegment> getWithSegment() { return Optional.ofNullable(withSegment);}
3.26
hmily_HmilySQLServerDeleteStatement_getOutputSegment_rdh
/** * Get output segment. * * @return output segment. */ public Optional<HmilyOutputSegment> getOutputSegment() { return Optional.ofNullable(outputSegment); }
3.26
hmily_RepositoryPathUtils_buildZookeeperRootPath_rdh
/** * Build zookeeper root path string. * * @param prefix * the prefix * @param id * the id * @return the string */ public static String buildZookeeperRootPath(final String prefix, final String id) { return String.join("/", prefix, id); }
3.26
hmily_RepositoryPathUtils_getFullFileName_rdh
/** * Gets full file name. * * @param filePath * the file path * @param id * the id * @return the full file name */ public static String getFullFileName(final String filePath, final String id) { return String.format("%s/%s", filePath, id); }
3.26
hmily_RepositoryPathUtils_buildMongoTableName_rdh
/** * Build mongo table name string. * * @param applicationName * the application name * @return the string */ public static String buildMongoTableName(final String applicationName) { return CommonConstant.DB_SUFFIX + applicationName.replaceAll("-", "_"); }
3.26
hmily_RepositoryPathUtils_buildZookeeperPathPrefix_rdh
/** * Build zookeeper path prefix string. * * @param applicationName * the application name * @return the string */ public static String buildZookeeperPathPrefix(final String applicationName) { return String.join("-", CommonConstant.PATH_SUFFIX, applicationName); }
3.26
hmily_RepositoryPathUtils_buildDbTableName_rdh
/** * Build db table name string. * * @param applicationName * the application name * @return the string */ public static String buildDbTableName(final String applicationName) {return CommonConstant.DB_SUFFIX + applicationName.replaceAll("-", "_");}
3.26
hmily_RepositoryPathUtils_buildRedisKey_rdh
/** * Build redis key string. * * @param keyPrefix * the key prefix * @param id * the id * @return the string */ public static String buildRedisKey(final String keyPrefix, final String id) { return String.join(":", keyPrefix, id); }
3.26
hmily_AbstractConfig_setLoad_rdh
/** * Sets load. * * @param load * the load */ public void setLoad(final boolean load) { isLoad = load; }
3.26
hmily_AbstractConfig_setPassive_rdh
/** * Sets passive. * * @param passive * the passive */ public void setPassive(final boolean passive) { this.passive = passive; }
3.26
hmily_HmilyColumnExtractor_extract_rdh
/** * Get left value if left value of expression is column segment. * * @param expression * expression segment * @return column segment */ public static Optional<HmilyColumnSegment> extract(final HmilyExpressionSegment expression) { if ((expression instanceof HmilyBinaryOperationExpression) && (((HmilyBinar...
3.26
hmily_HmilyTacRollbackExecutor_getInstance_rdh
/** * Gets instance. * * @return the instance */ public static HmilyTacRollbackExecutor getInstance() { if (instance == null) { synchronized(HmilyTacRollbackExecutor.class) { if (instance == null) { instance = new HmilyTacRollbackExecutor(); } } } return instance;}
3.26
hmily_ConfigLoader_againLoad_rdh
/** * Again load. * * @param context * the context * @param handler * the handler * @param tClass * the t class */ default void againLoad(final Supplier<Context> context, final LoaderHandler<T> handler, final Class<T> tClass) { T config = ConfigEnv.getInstance().getConfig(tClass); for (PropertyKeySo...
3.26
hmily_ConfigLoader_getOriginal_rdh
/** * Gets original. * * @return the original */ public ConfigLoader<Config> getOriginal() { return original; }
3.26
hmily_ConfigLoader_passive_rdh
/** * Passive subscription processes related events. When the current event is processed, * the push method is called to push it to subscribers in the system. * * @param context * the context * @param handler * the handler * @param config * Configuration information of things processed by load method * ...
3.26
hmily_ConfigLoader_push_rdh
/** * Implementation of Active Remote Push. * * @param context * the context * @param data * the data */ default void push(final Supplier<Context> context, final EventData data) { if (data == null) { return; } Set<EventConsumer<EventData>> events = ConfigEnv.getInstance().getEvents(); ...
3.26
hmily_ConfigLoader_with_rdh
/** * With context. * * @param sources * the sources * @param original * the original * @return the context. */ public Context with(final List<PropertyKeySource<?>> sources, final ConfigLoader<Config> original) { return new Context(original, sources); }
3.26
hmily_ConfigLoader_withSources_rdh
/** * With sources context. * * @param sources * the sources * @return the context. */ public Context withSources(final List<PropertyKeySource<?>> sources) { return with(sources, this.original); }
3.26
hmily_NacosConfig_fileName_rdh
/** * File name string. * * @return the string */ public String fileName() { return (dataId + ".") + fileExtension; }
3.26
hmily_UndoHook_run_rdh
/** * Run boolean. * * @param undo * the undo * @return the boolean */ public boolean run(final HmilyParticipantUndo undo) { for (Function<HmilyParticipantUndo, Boolean> each : consumers) { return each.apply(undo); } return false; ...
3.26
hmily_UndoHook_register_rdh
/** * Register. * * @param function * the function */ public void register(final Function<HmilyParticipantUndo, Boolean> function) { consumers.add(function); }
3.26
hmily_HmilyDataTypeLengthSegment_getScale_rdh
/** * get secondNumber. * * @return Optional. */public Optional<Integer> getScale() { return Optional.of(scale); }
3.26
hmily_XidImpl_newBranchId_rdh
/** * New branch id x id. * * @return the x id */ public XidImpl newBranchId() { return new XidImpl(this); }
3.26
hmily_XidImpl_newResId_rdh
/** * New res id x id. * * @param index * the index * @return the x id */ public XidImpl newResId(final int index) { return new XidImpl(this, index); }
3.26
hmily_CuratorZookeeperClient_addListener_rdh
/** * Add listener. * * @param context * the context * @param passiveHandler * the passive handler * @param config * the config * @throws Exception * the exception */ public void addListener(final Supplier<ConfigLoader.Context> context, final ConfigLoader.PassiveHandler<ZkPassiveConfig> passiveHandle...
3.26
hmily_CuratorZookeeperClient_getInstance_rdh
/** * Gets instance. * * @param zookeeperConfig * the zookeeper config * @return the instance */ public static CuratorZookeeperClient getInstance(final ZookeeperConfig zookeeperConfig) { if (instance == null) { synchronized(CuratorZookeeperClient.class) { if (instance == null) { ...
3.26
hmily_CuratorZookeeperClient_persist_rdh
/** * Persist. * * @param key * the key * @param value * the value */ public void persist(final String key, final String value) { try { ...
3.26