name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hmily_CuratorZookeeperClient_pull_rdh | /**
* Pull input stream.
*
* @param path
* the path
* @return the input stream
*/public InputStream pull(final String path)
{String content = get(path);if (LOGGER.isDebugEnabled()) {
LOGGER.debug("zookeeper content {}", content);
}
if (StringUtils.isBlank(content)) {
... | 3.26 |
hmily_CuratorZookeeperClient_get_rdh | /**
* Get string.
*
* @param path
* the path
* @return the string
*/
public String get(final String path) {
CuratorCache cache = findTreeCache(path);
if (null == cache) {
return getDirectly(path);
}
Optional<ChildData> resultInCache =
cache.get(path);
if (resultInCache.isPresent... | 3.26 |
hmily_TableMetaData_isPrimaryKey_rdh | /**
* Judge column whether primary key.
*
* @param columnIndex
* column index
* @return true if the column is primary key, otherwise false
*/
public boolean isPrimaryKey(final int columnIndex) {
return (columnIndex
< columnNames.size()) && columns.get(columnNames.get(columnIndex)).isPrimaryKey();
} | 3.26 |
hmily_TableMetaData_findColumnIndex_rdh | /**
* Find index of column.
*
* @param columnName
* column name
* @return index of column if found, otherwise -1
*/
public int
findColumnIndex(final String columnName) {
for (int i = 0; i < columnNames.size(); i++) {
if (columnNames.get(i).equals(columnName)) {
return i;
}
}
... | 3.26 |
hmily_TableMetaData_getColumnMetaData_rdh | /**
* Get column meta data.
*
* @param columnIndex
* column index
* @return column meta data
*/
public ColumnMetaData getColumnMetaData(final int columnIndex) {
return columns.get(columnNames.get(columnIndex));
} | 3.26 |
hmily_DubboHmilyAccountApplication_main_rdh | /**
* main.
*
* @param args
* args.
*/
public static void main(final String[] args) {
SpringApplication springApplication =
new SpringApplication(DubboHmilyAccountApplication.class);
springApplication.setWebApplicationType(WebApplicationType.NONE);
springApplication.run(args);
} | 3.26 |
hmily_ExtensionLoader_setValue_rdh | /**
* Sets value.
*
* @param value
* the value
*/
public void
setValue(final T value) {
this.value = value;
} | 3.26 |
hmily_ExtensionLoader_load_rdh | /**
* Load t.
*
* @param name
* the name
* @param argsType
* the args type
* @param args
* the args
* @param loader
* the loader
* @return the t
*/
public T load(final String name, final Class<?>[] argsType, final Object[] args, final ClassLoader loader) {
return loadExtension(name, loader, args... | 3.26 |
hmily_ExtensionLoader_loadAll_rdh | /**
* Load all list.
*
* @param loader
* the loader
* @return the list
*/
public List<T> loadAll(final ClassLoader loader) {
return loadAll(null, null, loader);
} | 3.26 |
hmily_ExtensionLoader_getValue_rdh | /**
* Gets value.
*
* @return the value
*/
public T getValue() {
return value;
} | 3.26 |
hmily_ExtensionLoader_getExtensionLoader_rdh | /**
* Gets extension loader.
*
* @param <T>
* the type parameter
* @param clazz
* the clazz
* @return the extension loader
*/
public static <T> ExtensionLoader<T> getExtensionLoader(final Class<T> clazz) {
if (clazz == null) {
throw new Nul... | 3.26 |
hmily_RpcMediator_transmit_rdh | /**
* Transmit.
*
* @param <T>
* the type parameter
* @param rpcTransmit
* the rpc transmit
* @param context
* the context
*/
public <T> void transmit(final RpcTransmit rpcTransmit, final T context) {
if (Objects.nonNull(context)) {
rpcTransmit.transmit(CommonConstant.HMILY_TRANSACTION_CONTEX... | 3.26 |
hmily_RpcMediator_getAndSet_rdh | /**
* Gets and set.
*
* @param function
* the function
* @param biConsumer
* the bi consumer
*/
public void getAndSet(final Function<String, Object> function, final BiConsumer<String, Object> biConsumer) {
Object result = function.apply(CommonConstant.HMILY_TRANSACTION_CONTEXT);
if (Objects.nonNull(... | 3.26 |
hmily_RpcMediator_acquire_rdh | /**
* Acquire hmily transaction context.
*
* @param <T>
* the type parameter
* @param rpcAcquire
* the rpc acquire
* @param clazz
* the clazz
* @return the hmily transaction context
*/
public <T> T acquire(final RpcAcquire rpcAcquire, final Class<T> clazz) {
T hmilyTransactionContext = null;
fin... | 3.26 |
hmily_RpcMediator_getInstance_rdh | /**
* Gets instance.
*
* @return the instance
*/
public static RpcMediator getInstance() {
return INSTANCE;
} | 3.26 |
hmily_EventTypeEnum_buildByCode_rdh | /**
* Build by code event type enum.
*
* @param code
* the code
* @return the event type enum
*/
public static EventTypeEnum buildByCode(final int code) {
return Arrays.stream(EventTypeEnum.values()).filter(e -> e.code == code).findFirst().orElseThrow(() -> new HmilyRuntimeException("can not support this co... | 3.26 |
hmily_HmilyShutdownHook_registerAutoCloseable_rdh | /**
* Register auto closeable.
*
* @param autoCloseable
* the auto closeable
*/
public void registerAutoCloseable(final AutoCloseable autoCloseable) {
autoCloseableHashSet.add(autoCloseable);
} | 3.26 |
hmily_ExtensionLoaderFactory_loadAll_rdh | /**
* Load all list.
*
* @param <T>
* the type parameter
* @param service
* the service
* @return the list
*/
public static <T> List<T> loadAll(final Class<T> service) {
return ExtensionLoader.getExtensionLoader(service).loadAll(findClassLoader());
} | 3.26 |
hmily_ExtensionLoaderFactory_load_rdh | /**
* Load t.
*
* @param <T>
* the type parameter
* @param service
* the service
* @param name
* the name
* @param argsType
* the args type
* @param args
* the args
* @return the t
*/
public static <T> T load(final Class<T> service, final String name, final Class<?>[] argsType, final Object[] a... | 3.26 |
hmily_ThreadLocalHmilyContext_set_rdh | /**
* set value.
*
* @param context
* context
*/
public void set(final HmilyTransactionContext context) {
CURRENT_LOCAL.set(context);
} | 3.26 |
hmily_ThreadLocalHmilyContext_get_rdh | /**
* get value.
*
* @return TccTransactionContext
*/
public HmilyTransactionContext get() {
return CURRENT_LOCAL.get();
} | 3.26 |
hmily_SubCoordinator_setRollbackOnly_rdh | /**
* Sets rollback only.
*/
public void setRollbackOnly() {
if (state == XaState.STATUS_PREPARING) {
state = XaState.STATUS_MARKED_ROLLBACK;
... | 3.26 |
hmily_SubCoordinator_doOnePhaseCommit_rdh | /**
* 表示为第一阶断的直接提交.
*/
private void doOnePhaseCommit() throws TransactionRolledbackException {
state = XaState.STATUS_COMMITTING;HmilyXaResource xaResource = ((HmilyXaResource) (resources.get(0)));
try {
xaResource.commit(true);
state = XaState.STATUS_COMMITTED;
}
catch (XAException e... | 3.26 |
hmily_SubCoordinator_doCommit_rdh | /**
* 2pc.
*/
private synchronized void doCommit() {
state = XaState.STATUS_COMMITTING;
int commitError = 0;
for (int i = 0; i < resources.size(); i++) {
HmilyXaResource v12 = ((HmilyXaResource) (resources.elementAt(i)));
try {
// false is 2pc.
v12.commit(false);
... | 3.26 |
hmily_SubCoordinator_addSynchronization_rdh | /**
* Add synchronization boolean.
*
* @param synchronization
* the synchronization
* @throws RollbackException
* the rollback exception
*/
public synchronized void addSynchronization(final Synchronization synchronization) throws RollbackException {
if (state == XaState.STATUS_ACTIVE) {
synchroni... | 3.26 |
hmily_SubCoordinator_addXaResource_rdh | /**
* Add a xa Resource.
*
* @param xaResource
* the xa resource
* @return boolean boolean
*/
public synchronized boolean addXaResource(final XAResource
xaResource) {
switch (state) {
case STATUS_MARKED_ROLLBACK :
break;
case STATUS_ACTIVE :
break;
default :... | 3.26 |
hmily_SubCoordinator_nextXid_rdh | /**
* Next xid x id.
*
* @param xId
* the x id
* @return the x id
*/
public synchronized XidImpl nextXid(final XidImpl xId) {
return xId.newResId(this.resources.size() + 1);
} | 3.26 |
hmily_DbTypeUtils_buildByDriverClassName_rdh | /**
* check db type.
*
* @param driverClassName
* driverClassName
* @return mysql sqlserver oracle postgresql.
*/
public static String buildByDriverClassName(final String driverClassName) {
String dbType = null;
if (driverClassName.contains(CommonConstant.DB_MYSQ... | 3.26 |
hmily_TarsHmilyConfiguration_hmilyCommunicatorBeanPostProcessor_rdh | /**
* add HmilyCommunicatorBeanPostProcessor and override old old tars's bean post processor.
*
* @author tydhot
*/
@Configuration public class TarsHmilyConfiguration {
/**
* add HmilyCommunicatorBeanPostProcessor.
*
* @param communicator
* communicator
* @return HmilyCommunicatorBean... | 3.26 |
hmily_HmilySQLRevertEngineFactory_newInstance_rdh | /**
* New instance hmily SQL revert engine.
*
* @return the hmily SQL revert engine
*/
public static HmilySQLRevertEngine newInstance() {
if (hmilySqlRevertEngine == null) {
synchronized(HmilySQLRevertEngineFactory.class) {
if (hmilySqlRevertEngine == null) {HmilyConfig config = ConfigEnv.g... | 3.26 |
hmily_HmilyParticipantCacheManager_removeByKey_rdh | /**
* remove guava cache by key.
*
* @param participantId
* guava cache key.
*/
public void removeByKey(final Long participantId) {
if (Objects.nonNull(participantId)) {
LOADING_CACHE.invalidate(participantId);
}
} | 3.26 |
hmily_HmilyParticipantCacheManager_get_rdh | /**
* acquire hmilyTransaction.
*
* @param participantId
* this guava key.
* @return {@linkplain HmilyTransaction}
*/
public List<HmilyParticipant> get(final Long participantId) {
try {
return LOADING_CACHE.get(participantId);
} catch (ExecutionException e) {
return Collections.emptyList... | 3.26 |
hmily_HmilyParticipantCacheManager_cacheHmilyParticipant_rdh | /**
* Cache hmily participant.
*
* @param participantId
* the participant id
* @param hmilyParticipant
* the hmily participant
*/
public void cacheHmilyParticipant(final Long participantId, final HmilyParticipant hmilyParticipant) {
List<HmilyParticipant> existHmil... | 3.26 |
hmily_HmilyTransactionHolder_getCurrentTransaction_rdh | /**
* acquired by threadLocal.
*
* @return {@linkplain HmilyTransaction}
*/
public HmilyTransaction getCurrentTransaction() {
return CURRENT.get();
} | 3.26 |
hmily_HmilyTransactionHolder_cacheHmilyParticipant_rdh | /**
* Cache hmily participant.
*
* @param hmilyParticipant
* the hmily participant
*/
public void cacheHmilyParticipant(final HmilyParticipant hmilyParticipant) {
if (Objects.isNull(hmilyParticipant)) {
return;
}
HmilyParticipantCacheManager.getInstance().cacheHmilyParticipant(hmilyParticipant);
}
/**
* wh... | 3.26 |
hmily_HmilyTransactionHolder_getInstance_rdh | /**
* Gets instance.
*
* @return the instance
*/
public static HmilyTransactionHolder getInstance() {
return INSTANCE;
} | 3.26 |
hmily_HmilyTransactionHolder_remove_rdh | /**
* clean threadLocal help gc.
*/
public void remove() {
CURRENT.remove();
} | 3.26 |
hmily_HmilyTransactionHolder_registerStarterParticipant_rdh | /**
* add participant.
*
* @param hmilyParticipant
* {@linkplain HmilyParticipant}
*/
public void registerStarterParticipant(final HmilyParticipant hmilyParticipant) {
if (Objects.isNull(hmilyParticipant)) {
return;
}
Optional.ofNullable(getCurrentTransaction()).ifPresent(c -> c.registerParticipant(hmilyPart... | 3.26 |
hmily_CommonAssembler_assembleHmilySimpleTableSegment_rdh | /**
* Assemble hmily simple table segment.
*
* @param simpleTableSegment
* simple table segment
* @return hmily simple table segment
*/
public static HmilySimpleTableSegment assembleHmilySimpleTableSegment(final SimpleTableSegment simpleTableSegment) {
TableNameSegment tableNameSegment = simpleTableSegment... | 3.26 |
hmily_CommonAssembler_assembleHmilyPaginationValueSegment_rdh | /**
* Assemble hmily PaginationValue segment.
*
* @param paginationValue
* pagination value segment
* @return Hmily pagination value segment
*/
public static HmilyPaginationValueSegment assembleHmilyPaginationValueSegment(final PaginationValueSegment paginationValue) {
HmilyPaginationValueSegment hmilyPagin... | 3.26 |
hmily_CommonAssembler_assembleHmilyExpressionSegment_rdh | /**
* Assemble hmily expression segment.
*
* @param expression
* expression
* @return hmily expression segment
*/
public static HmilyExpressionSegment assembleHmilyExpressionSegment(final ExpressionSegment expression) {
HmilyExpressionSegment result = null;
if (expression instanceof BinaryOperationExpr... | 3.26 |
hmily_CommonAssembler_assembleHmilyColumnSegment_rdh | /**
* Assemble hmily column segment.
*
* @param column
* column
* @return hmily column segment
*/public static HmilyColumnSegment assembleHmilyColumnSegment(final ColumnSegment column) {
HmilyIdentifierValue
hmilyIdentifierValue = new HmilyIdentifierValue(column.getIdentifier().getValue());
HmilyC... | 3.26 |
hmily_AbstractHmilyDatabase_executeUpdate_rdh | /**
* Execute update int.
*
* @param sql
* the sql
* @param params
* the params
* @return the int
*/
private int executeUpdate(final String sql, final Object... params) {
try (Connection con
= dataSource.getConnection();PreparedStatement ps = createPreparedStatement(con, sql, params)) {
return ps.executeUpd... | 3.26 |
hmily_Resource_getResult_rdh | /**
* Gets result.
*
* @param r
* the r
* @return the result
*/
public static Result getResult(final int r) {
Result rs = READONLY;
switch (r) {
case 0 :
rs
= COMMIT;
break;
case 1 :
rs = ROLLBACK;
break;
case 2 :
rs = READO... | 3.26 |
hmily_HmilyMySQLInsertStatement_getSetAssignment_rdh | /**
* Get set assignment segment.
*
* @return set assignment segment
*/
public Optional<HmilySetAssignmentSegment> getSetAssignment() {
return
Optional.ofNullable(setAssignment);
} | 3.26 |
hmily_RepositorySupportEnum_acquire_rdh | /**
* Acquire compensate cache type compensate cache type enum.
*
* @param support
* the compensate cache type
* @return the compensate cache type enum
*/
public static RepositorySupportEnum acquire(final String support) {
Optional<RepositorySupportEnum> repositorySupportEnum = Arrays.stream(RepositorySuppo... | 3.26 |
hmily_AggregateBinder_binder_rdh | /**
* binder to AggregateBinder.
*
* @param target
* ta
* @param env
* the env
* @return aggregate binder
*/
static AggregateBinder<?> binder(final BindData<?> target, final Binder.Env env) {DataType type = target.getType();
// 如果map集合.
if (type.isMap()) {
return new MapBinder(env);
} ... | 3.26 |
hmily_AggregateBinder_bind_rdh | /**
* Bind object.
*
* @param name
* the name
* @param target
* the target
* @param elementBinder
* the element binder
* @return the object
*/
@SuppressWarnings("unchecked")
public Object bind(final PropertyName name, final BindData<?> target, final AggregateElementBinder elementBinder) {
Object re... | 3.26 |
hmily_AggregateBinder_wasSupplied_rdh | /**
* Was supplied boolean.
*
* @return the boolean
*/
public boolean wasSupplied() {
return this.supplied != null;
} | 3.26 |
hmily_AggregateBinder_getEnv_rdh | /**
* Gets env.
*
* @return the env
*/
Env getEnv() {
return env;
} | 3.26 |
hmily_GrpcHmilyClient_syncInvoke_rdh | /**
* grpc sync.
*
* @param <T>
* T
* @param clazz
* clazz
* @param abstractStub
* AbstractStub
* @param method
* String
* @param param
* Object
* @return t T
*/
public <T> T syncInvoke(final AbstractStub abstractStub, final String method, final Object param, final Class<T> clazz) {
GrpcHmil... | 3.26 |
hmily_AbstractHmilyTransactionAspect_hmilyInterceptor_rdh | /**
* this is point cut with {@linkplain HmilyTCC}.
*/
@Pointcut("@annotation(org.dromara.hmily.annotation.HmilyTCC) || @annotation(org.dromara.hmily.annotation.HmilyTAC) || @annotation(org.dromara.hmily.annotation.HmilyXA)")
public void hmilyInterceptor() {
} | 3.26 |
hmily_AbstractHmilyTransactionAspect_interceptTccMethod_rdh | /**
* this is around in {@linkplain HmilyTCC}.
*
* @param proceedingJoinPoint
* proceedingJoinPoint
* @return Object object
* @throws Throwable
* Throwable
*/
@Around("hmilyInterceptor()")
public Object interceptTccMethod(final ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
return intercept... | 3.26 |
hmily_HmilyLoadBalanceUtils_doSelect_rdh | /**
* Do select referer.
*
* @param <T>
* the type parameter
* @param defaultReferer
* the default referer
* @param refererList
* the referer list
* @return the referer
*/
public static <T> Referer<T> doSelect(final Referer<T> defaultReferer, final List<Referer<T>> refererList) {
final HmilyTransac... | 3.26 |
hmily_QuoteCharacter_getQuoteCharacter_rdh | /**
* Get quote character.
*
* @param value
* value to be get quote character
* @return value of quote character
*/
public static QuoteCharacter getQuoteCharacter(final String value) {
if (Strings.isNullOrEmpty(value)) {return NONE;
}
return Arrays.stream(values()).filter(each -> (NONE != each) && (... | 3.26 |
hmily_QuoteCharacter_wrap_rdh | /**
* Wrap value with quote character.
*
* @param value
* value to be wrapped
* @return wrapped value
*/
public String wrap(final String value) {
return String.format("%s%s%s", startDelimiter, value, endDelimiter);
} | 3.26 |
hmily_HmilyAutoConfiguration_refererAnnotationBeanPostProcessor_rdh | /**
* Referer annotation bean post processor referer annotation bean post processor.
*
* @return the referer annotation bean post processor
*/
@Bean
@ConditionalOnProperty(value = "hmily.support.rpc.annotation", havingValue = "true")
public BeanPostProcessor refererAnnotationBeanPostProcessor() {
return new Re... | 3.26 |
hmily_HmilyAutoConfiguration_hmilyTransactionAspect_rdh | /**
* HmilyAutoConfiguration is spring boot starter handler.
*
* @author xiaoyu(Myth)
*/
@Configuration
@EnableAspectJAutoProxy(proxyTargetClass = true)public class HmilyAutoConfiguration {
/**
* Hmily transaction aspect spring boot hmily transaction aspect.
*
* @return the spring boot hmily tran... | 3.26 |
hmily_DateUtils_getDateYYYY_rdh | /**
* Gets date yyyy.
*
* @return the date yyyy
*/
public static Date getDateYYYY() {
LocalDateTime localDateTime = parseLocalDateTime(getCurrentDateTime());
ZoneId zone = ZoneId.systemDefault();
Instant v2 = localDateTime.atZone(zone).toInstant();
return Date.from(v2);
} | 3.26 |
hmily_DateUtils_parseLocalDateTime_rdh | /**
* parseLocalDateTime.
* out put format:yyyy-MM-dd HH:mm:ss
*
* @param str
* date String
* @return yyyy-MM-dd HH:mm:ss
* @see LocalDateTime
*/private static LocalDateTime parseLocalDateTime(final String str) {
return LocalDateTime.parse(str, DateTimeFormatter.ofPattern(DATE_FORMAT_DATETIME));
} | 3.26 |
hmily_InsertStatementAssembler_assembleHmilyInsertStatement_rdh | /**
* Assemble Hmily insert statement.
*
* @param insertStatement
* insert statement
* @param hmilyInsertStatement
* hmily insert statement
* @return hmily insert statement
*/
public static HmilyInsertStatement assembleHmilyInsertStatement(final InsertStatement insertStatement, final HmilyInsertStatement h... | 3.26 |
hmily_HmilyLockCacheManager_get_rdh | /**
* Acquire hmily lock.
*
* @param lockId
* this guava key.
* @return {@linkplain HmilyTransaction}
*/
public Optional<HmilyLock> get(final String lockId) {
try {
return loadingCache.get(lockId);
} catch (ExecutionException ex) {
return Optional.empty();
}
} | 3.26 |
hmily_HmilyLockCacheManager_cacheHmilyLock_rdh | /**
* Cache hmily lock.
*
* @param lockId
* lock id
* @param hmilyLock
* the hmily lock
*/
public void cacheHmilyLock(final String lockId,
final HmilyLock hmilyLock) {
loadingCache.put(lockId, Optional.of(hmilyLock));
} | 3.26 |
hmily_HmilyLockCacheManager_removeByKey_rdh | /**
* remove guava cache by key.
*
* @param lockId
* guava cache key.
*/
public void removeByKey(final String lockId) {
if (Objects.nonNull(lockId)) {
loadingCache.invalidate(lockId);
}
} | 3.26 |
hmily_HmilyLockCacheManager_getInstance_rdh | /**
* Hmily lock cache manager.
*
* @return Hmily lock cache manager instance
*/
public static HmilyLockCacheManager getInstance() {
return
INSTANCE;
} | 3.26 |
hmily_YamlProcessor_setResources_rdh | /**
* Sets resources.
*
* @param resources
* the resources
*/
public void setResources(final InputStream... resources) {
this.resources = resources;
} | 3.26 |
hmily_YamlProcessor_process_rdh | /**
* Process.
*
* @param callback
* the callback
*/
protected void process(final MatchCallback callback) {
Yaml yaml = createYaml();for (InputStream resource : this.resources) {
boolean found = process(callback, yaml, resource);if ((this.resolutionMethod ==
ResolutionMethod.FIRST_FOUND) && f... | 3.26 |
hmily_YamlProcessor_getMostSpecific_rdh | /**
* The matcher should not be considered.
*/ABSTAIN;
/**
* Compare two {@link MatchStatus} items, returning the most specific status.
*
* @param a
* the a
* @param b
* the b
* @return the most specific
*/
public static MatchStatus
getMostSpecific(final MatchStatus a, final MatchStatus b) {
return a... | 3.26 |
hmily_YamlProcessor_getFlattenedMap_rdh | /**
* Gets flattened map.
*
* @param source
* the source
* @return the flattened map
*/
protected final Map<String, Object> getFlattenedMap(final Map<String, Object> source) {Map<String, Object> result = new LinkedHashMap<>();
buildFlattenedMap(result, source, null);
return result;
} | 3.26 |
hmily_UpdateStatementAssembler_assembleHmilyUpdateStatement_rdh | /**
* Assemble Hmily update statement.
*
* @param updateStatement
* update statement
* @param hmilyUpdateStatement
* hmily update statement
* @return hmily update statement
*/
public static HmilyUpdateStatement assembleHmilyUpdateStatement(final UpdateStatement updateStatement, final HmilyUpdateStatement hm... | 3.26 |
hmily_AbstractHmilySQLParserExecutor_generateHmilyInsertStatement_rdh | /**
* Generate Hmily insert statement.
*
* @param insertStatement
* insert statement
* @param hmilyInsertStatement
* hmily insert statement
* @return hmily insert statement
*/
public HmilyInsertStatement generateHmilyInsertStatement(final
InsertStatement insertStatement, final HmilyInsertStatement hmilyIns... | 3.26 |
hmily_AbstractHmilySQLParserExecutor_generateHmilyDeleteStatement_rdh | /**
* Generate Hmily delete statement.
*
* @param deleteStatement
* delete statement
* @param hmilyDeleteStatement
* hmily delete statement
* @return hmily delete statement
*/
public HmilyDeleteStatement generateHmilyDeleteStatement(final DeleteStatement deleteStatement, final HmilyDeleteStatement hmilyDel... | 3.26 |
hmily_AbstractHmilySQLParserExecutor_generateHmilySelectStatement_rdh | /**
* Generate Hmily select statement.
*
* @param selectStatement
* select statement
* @param hmilySelectStatement
* hmily select statement
* @return hmily select statement
*/
public HmilySelectStatement generateHmilySelectStatement(final SelectStatement selectStatement, final HmilySelectStatement hmilySel... | 3.26 |
hmily_AbstractHmilySQLParserExecutor_generateHmilyUpdateStatement_rdh | /**
* Generate Hmily update statement.
*
* @param updateStatement
* update statement
* @param hmilyUpdateStatement
* hmily update statement
* @return hmily update statement
*/
public HmilyUpdateStatement generateHmilyUpdateStatement(final UpdateStatement updateStatement, final HmilyUpdateStatement hmilyUpda... | 3.26 |
hmily_MotanHmilyAccountApplication_main_rdh | /**
* main.
*
* @param args
* args.
*/
public static void main(final String[] args) {
SpringApplication v0 = new SpringApplication(MotanHmilyAccountApplication.class);
v0.setWebApplicationType(WebApplicationType.NONE);
v0.run(args);
MotanSwitcherUtil.setSwitcherValue(MotanConstants.REGISTRY_H... | 3.26 |
hmily_XaLoadBalancerAutoConfiguration_xaLoadBalancerBeanPostProcessor_rdh | /**
* 注册 {@link XaLoadBalancerBeanPostProcessor} Bean.
*
* @return {@link XaLoadBalancerBeanPostProcessor} Bean
*/
@Bean
public static XaLoadBalancerBeanPostProcessor xaLoadBalancerBeanPostProcessor() {
return new XaLoadBalancerBeanPostProcessor();
} | 3.26 |
hmily_XaLoadBalancerAutoConfiguration_afterPropertiesSet_rdh | /**
* Ribbon基于{@link SpringClientFactory}来实现配置隔离,
* 要保证每种配置情况的{@link ILoadBalancer}都会被包装.
* 所以给{@link SpringClientFactory}添加一个默认config,它会注册{@link XaLoadBalancerBeanPostProcessor}.
*/
@Override
public void afterPropertiesSet() {
// default. 开头的是每个app context公用的默认的配置类
RibbonClientSpecification specification =... | 3.26 |
hmily_XaLoadBalancerAutoConfiguration_xaTransactionEventListener_rdh | /**
* Register {@link SpringCloudXaLoadBalancer.TransactionEventListener} Bean.
*
* @return {@link SpringCloudXaLoadBalancer.TransactionEventListener} Bean
*/
@Bean
public TransactionEventListener xaTransactionEventListener() {
return new SpringCloudXaLoadBalancer.TransactionEventListener();
} | 3.26 |
hmily_HmilyRoundRobinLoadBalance_select_rdh | /**
* Use load balancing to select invoker.
*
* @param invokeContext
* invokeContext
* @return Invoker
* @throws NoInvokerException
* NoInvokerException
*/
@Override
public Invoker<T> select(final InvokeContext invokeContext) throws NoInvokerException {
Li... | 3.26 |
hmily_HmilyRoundRobinLoadBalance_m0_rdh | /**
* Refresh local invoker.
*
* @param invokers
* invokers
*/
@Override
public void m0(final Collection<Invoker<T>> invokers) {
LOGGER.info("{} try to refresh RoundRobinLoadBalance's invoker cache, size= {} ", config.getSimpleObjectName(), CollectionUtils.isEmpty(invokers) ? 0 : invokers.size());
if (Co... | 3.26 |
hmily_HmilyXaException_getMessage_rdh | /**
* Gets message.
*
* @param xaException
* the xa exception
* @return the message
*/
public static String getMessage(final XAException xaException) {
int errorCode = xaException.errorCode;
String s = ERROR_CODES.get(errorCode);
return (("errorCode:" + errorCode) + ":") + s;} | 3.26 |
hmily_MotanHmilyInventoryApplication_main_rdh | /**
* main.
*
* @param args
* args.
*/
public static void main(final String[] args) {
SpringApplication springApplication = new SpringApplication(MotanHmilyInventoryApplication.class);
springApplication.setWebApplicationType(WebApplicationType.NONE);
springApplication.run(args);
MotanSwitcherUtil... | 3.26 |
hmily_HmilyInExpression_getExpressionList_rdh | /**
* Get expression list from right.
*
* @return expression list.
*/
public Collection<HmilyExpressionSegment> getExpressionList() {
Collection<HmilyExpressionSegment> result = new LinkedList<>();
if (right instanceof HmilyListExpression) {
result.addAll(((HmilyListExpression) (right)).getItems());... | 3.26 |
hmily_OriginTrackedPropertiesLoader_getCharacter_rdh | /**
* Gets character.
*
* @return the character
*/
public char getCharacter() {
return ((char) (this.character));
} | 3.26 |
hmily_OriginTrackedPropertiesLoader_load_rdh | /**
* Load map.
*
* @param expandLists
* the expand lists
* @return the map
* @throws IOException
* the io exception
*/
public Map<String,
Object> load(final boolean expandLists) throws IOException {
try (CharacterReader reader = new CharacterReader(this.resource)) {
Map<String, Object> result ... | 3.26 |
hmily_OriginTrackedPropertiesLoader_read_rdh | /**
* Read boolean.
*
* @param wrappedLine
* the wrapped line
* @return the boolean
* @throws IOException
* the io exception
*/
public boolean read(final boolean wrappedLine) throws IOException {
this.escaped = false;
this.character = this.reader.read();
this.columnNumber++;
if (this.colu... | 3.26 |
hmily_OriginTrackedPropertiesLoader_isEndOfFile_rdh | /**
* Is end of file boolean.
*
* @return the boolean
*/
public boolean isEndOfFile() {
return this.character == (-1);
} | 3.26 |
hmily_OriginTrackedPropertiesLoader_isListDelimiter_rdh | /**
* Is list delimiter boolean.
*
* @return the boolean
*/
public boolean isListDelimiter() {
return (!this.escaped) && (this.character == ',');
} | 3.26 |
hmily_OriginTrackedPropertiesLoader_isEndOfLine_rdh | /**
* Is end of line boolean.
*
* @return the boolean
*/
public boolean
isEndOfLine() {
return (this.character == (-1)) || ((!this.escaped) && (this.character == '\n'));
} | 3.26 |
hmily_OriginTrackedPropertiesLoader_isWhiteSpace_rdh | /**
* Is white space boolean.
*
* @return the boolean
*/
public boolean isWhiteSpace() {
return (!this.escaped) && (((this.character == ' ') || (this.character == '\t')) || (this.character == '\f'));
} | 3.26 |
hmily_HmilyLogo_logo_rdh | /**
* Logo.
*/
public void logo() {
String bannerText = buildBannerText();
if (LOGGER.isInfoEnabled()) {
LOGGER.info(bannerText);
} else {
System.out.print(bannerText);
}
} | 3.26 |
hmily_HmilyContextHolder_set_rdh | /**
* Set.
*
* @param context
* the context
*/
public static void set(final HmilyTransactionContext context) {
hmilyContext.set(context);
} | 3.26 |
hmily_MapBinder_bindEntries_rdh | /**
* Bind entries.
*
* @param source
* the source
* @param map
* the map
*/void bindEntries(final ConfigPropertySource source, final Map<Object, Object> map) {
source.stream().forEach(name -> {
boolean ancestorOf = root.isAncestorOf(name);
if (ancestorOf) {BindData<?> valueBindData = get... | 3.26 |
hmily_HmilyTccTransactionExecutor_preTryParticipant_rdh | /**
* this is Participant transaction preTry.
*
* @param context
* transaction context.
* @param point
* cut point
* @return TccTransaction hmily transaction
*/
public HmilyParticipant preTryParticipant(final HmilyTransactionContext context, final ProceedingJoinPoint point) {
LogUtil.debug(LOGGER, "part... | 3.26 |
hmily_HmilyTccTransactionExecutor_preTry_rdh | /**
* transaction preTry.
*
* @param point
* cut point.
* @return TccTransaction hmily transaction
*/
public HmilyTransaction preTry(final ProceedingJoinPoint point)
{LogUtil.debug(LOGGER, () -> "......hmily tcc transaction starter....");
// build tccTransaction
HmilyTransaction hmilyTransaction = cre... | 3.26 |
hmily_HmilyTccTransactionExecutor_participantConfirm_rdh | /**
* Participant confirm object.
*
* @param hmilyParticipantList
* the hmily participant list
* @param selfParticipantId
* the self participant id
* @return the object
*/
public Object participantConfirm(final List<HmilyParticipant> hmilyParticipantList, final Long selfParticipantId) {
if (CollectionUt... | 3.26 |
hmily_HmilyTccTransactionExecutor_participantCancel_rdh | /**
* Participant cancel object.
*
* @param hmilyParticipants
* the hmily participants
* @param selfParticipantId
* the self participant id
* @return the object
*/
public Object participantCancel(final List<HmilyParticipant> hmilyParticipants, final Long selfParticipantId) {
LogUtil.debug(LOGGER, () -> ... | 3.26 |
hmily_HmilyTccTransactionExecutor_globalConfirm_rdh | /**
* Call the confirm method and basically if the initiator calls here call the remote or the original method
* However, the context sets the call confirm
* The remote service calls the confirm method.
*
* @param currentTransaction
* {@linkplain HmilyTransaction}
* @throws HmilyRuntimeException
* ex
*/
pu... | 3.26 |
hmily_HmilyTccTransactionExecutor_updateStartStatus_rdh | /**
* update transaction status by disruptor.
*
* @param hmilyTransaction
* {@linkplain HmilyTransaction}
*/
public void updateStartStatus(final HmilyTransaction hmilyTransaction) {
HmilyRepositoryStorage.updateHmilyTransactionStatus(hmilyTransaction);
HmilyParticipant hmilyParticipant = filterStartHmily... | 3.26 |
hmily_HmilyTccTransactionExecutor_globalCancel_rdh | /**
* cancel transaction.
*
* @param currentTransaction
* {@linkplain HmilyTransaction}
*/
public void globalCancel(final HmilyTransaction currentTransaction) {
LogUtil.debug(LOGGER, () -> "tcc cancel ...........start!");if (Objects.isNull(currentTransaction) || CollectionUtil... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.