proj_name
stringclasses
131 values
relative_path
stringlengths
30
228
class_name
stringlengths
1
68
func_name
stringlengths
1
48
masked_class
stringlengths
78
9.82k
func_body
stringlengths
46
9.61k
len_input
int64
29
2.01k
len_output
int64
14
1.94k
total
int64
55
2.05k
relevant_context
stringlengths
0
38.4k
hs-web_hsweb-framework
hsweb-framework/hsweb-starter/src/main/java/org/hswebframework/web/starter/jackson/CustomTypeFactory.java
CustomTypeFactory
withModifier
class CustomTypeFactory extends TypeFactory { private EntityFactory entityFactory; public CustomTypeFactory(EntityFactory factory) { super(new LRUMap<>(64, 1024)); this.entityFactory = factory; } protected CustomTypeFactory(LookupCache<Object, JavaType> typeCache, TypeParser p, ...
LookupCache<Object, JavaType> typeCache = _typeCache; TypeModifier[] mods; if (mod == null) { // mostly for unit tests mods = null; // 30-Jun-2016, tatu: for some reason expected semantics are to clear cache // in this case; can't recall why, but keeping t...
542
244
786
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-starter/src/main/java/org/hswebframework/web/starter/jackson/Jackson2Tokenizer.java
Jackson2Tokenizer
tokenize
class Jackson2Tokenizer { private final JsonParser parser; private final DeserializationContext deserializationContext; private final boolean tokenizeArrayElements; private TokenBuffer tokenBuffer; private int objectDepth; private int arrayDepth; // TODO: change to ByteBufferFeeder when supported by Jacks...
try { JsonParser parser = jsonFactory.createNonBlockingByteArrayParser(); DeserializationContext context = objectMapper.getDeserializationContext(); if (context instanceof DefaultDeserializationContext) { context = ((DefaultDeserializationContext) context).createInstance( objectMapper.getDeserial...
1,303
180
1,483
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-api/src/main/java/org/hswebframework/web/system/authorization/api/entity/AuthorizationSettingEntity.java
AuthorizationSettingEntity
copy
class AuthorizationSettingEntity implements Entity { @Id @Column(length = 32) @GeneratedValue(generator = "md5") @Schema(description = "ID") private String id; @Column(length = 32, nullable = false, updatable = false) @Comment("权限ID") @NotBlank(message = "权限ID不能为空",groups = CreateGroup....
AuthorizationSettingEntity newSetting= FastBeanCopier.copy(this,new AuthorizationSettingEntity()); if(!CollectionUtils.isEmpty(newSetting.getActions())){ newSetting.setActions(newSetting.getActions().stream().filter(actionFilter).collect(Collectors.toSet())); } if(!Collectio...
791
137
928
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-api/src/main/java/org/hswebframework/web/system/authorization/api/entity/DataAccessEntity.java
DataAccessEntity
toMap
class DataAccessEntity { @Schema(description = "操作标识") private String action; @Schema(description = "数据权限类型") private String type; @Schema(description = "说明") private String describe; @Schema(description = "配置") private Map<String,Object> config; public Map<String,Object> toMap(...
Map<String,Object> map = new HashMap<>(); map.put("type",type); map.put("action",action); map.put("describe",describe); if(config!=null){ map.putAll(config); } return map;
111
78
189
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-api/src/main/java/org/hswebframework/web/system/authorization/api/entity/DimensionUserEntity.java
DimensionUserEntity
generateId
class DimensionUserEntity extends GenericEntity<String> { @Comment("维度类型ID") @Column(name = "dimension_type_id", nullable = false, length = 32) @Schema(description = "维度类型ID,如: org,tenant") private String dimensionTypeId; @Comment("维度ID") @Column(name = "dimension_id", nullable = false, length...
if (StringUtils.isEmpty(getId())) { String id = DigestUtils .md5DigestAsHex(String.format("%s-%s-%s", dimensionTypeId, dimensionId, userId).getBytes()); setId(id); ...
493
75
568
<methods>public non-sealed void <init>() ,public transient java.lang.String toString(java.lang.String[]) ,public java.lang.String toString() <variables>private java.lang.String id
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-api/src/main/java/org/hswebframework/web/system/authorization/api/entity/PermissionEntity.java
PermissionEntity
copy
class PermissionEntity extends GenericEntity<String> implements RecordCreationEntity, RecordModifierEntity { @Override @Pattern(regexp = "^[0-9a-zA-Z_\\-]+$", message = "ID只能由数字,字母,下划线和中划线组成", groups = CreateGroup.class) public String getId() { return super.getId(); } @Column @Comment(...
PermissionEntity entity = FastBeanCopier.copy(this, new PermissionEntity()); if (!CollectionUtils.isEmpty(entity.getActions())) { entity.setActions(entity.getActions().stream().filter(actionFilter).collect(Collectors.toList())); } if (!CollectionUtils.isEmpty(entity.getOpti...
691
135
826
<methods>public non-sealed void <init>() ,public transient java.lang.String toString(java.lang.String[]) ,public java.lang.String toString() <variables>private java.lang.String id
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-api/src/main/java/org/hswebframework/web/system/authorization/api/event/ClearUserAuthorizationCacheEvent.java
ClearUserAuthorizationCacheEvent
of
class ClearUserAuthorizationCacheEvent extends DefaultAsyncEvent { private Set<String> userId; private boolean all; private boolean async; private static final String DISABLE_KEY = ClearUserAuthorizationCacheEvent.class + "_Disabled"; public static <T> Flux<T> disable(Flux<T> task) { ret...
ClearUserAuthorizationCacheEvent event = new ClearUserAuthorizationCacheEvent(); if (collection == null || collection.isEmpty()) { event.all = true; } else { event.userId = new HashSet<>(collection); } return event;
469
69
538
<methods>public non-sealed void <init>() ,public synchronized void async(Publisher<?>) ,public synchronized void first(Publisher<?>) ,public Mono<java.lang.Void> getAsync() ,public boolean hasListener() ,public Mono<java.lang.Void> publish(ApplicationEventPublisher) ,public void transform(Function<Mono<?>,Publisher<?>>...
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/configuration/PermissionProperties.java
PermissionFilter
doFilter
class PermissionFilter { //开启权限过滤 private boolean enabled = false; //越权赋权时处理逻辑 private UnAuthStrategy unAuthStrategy = UnAuthStrategy.error; private Set<String> excludeUsername = new HashSet<>(); public AuthorizationSettingEntity handleSetting(Authentication authenticat...
if (!enabled || excludeUsername.contains(authentication.getUser().getUsername())) { return flux; } return flux .map(entity -> entity .copy(action -> authentication.hasPermission(entity.getId(), action.getAction()), ...
446
96
542
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/service/DefaultAuthorizationSettingService.java
DefaultAuthorizationSettingService
clearUserAuthCache
class DefaultAuthorizationSettingService extends GenericReactiveCrudService<AuthorizationSettingEntity, String> { @Autowired private ApplicationEventPublisher eventPublisher; @Autowired private List<DimensionProvider> providers; protected AuthorizationSettingEntity generateId(AuthorizationSetting...
return Flux .fromIterable(providers) .flatMap(provider -> //按维度类型进行映射 provider.getAllType() .map(DimensionType::getId) .map(t -> Tu...
858
226
1,084
<methods>public non-sealed void <init>() ,public ReactiveRepository<org.hswebframework.web.system.authorization.api.entity.AuthorizationSettingEntity,java.lang.String> getRepository() <variables>private ReactiveRepository<org.hswebframework.web.system.authorization.api.entity.AuthorizationSettingEntity,java.lang.String...
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/service/DefaultDimensionService.java
DefaultDimensionService
getDimensionsById
class DefaultDimensionService extends GenericReactiveTreeSupportCrudService<DimensionEntity, String> implements DimensionProvider, DimensionUserBindProvider { @Autowired private ReactiveRepository<DimensionUserEntity, String> dimensionUserRepository; @Autowired private Reactive...
return this.createQuery() .where(DimensionEntity::getTypeId, type.getId()) .in(DimensionEntity::getId, idList) .fetch() .map(entity -> DynamicDimension.of(entity, type));
1,005
66
1,071
<methods>public non-sealed void <init>() ,public ReactiveRepository<org.hswebframework.web.system.authorization.api.entity.DimensionEntity,java.lang.String> getRepository() <variables>private ReactiveRepository<org.hswebframework.web.system.authorization.api.entity.DimensionEntity,java.lang.String> repository
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/service/DefaultDimensionUserService.java
DefaultDimensionUserService
publishEvent
class DefaultDimensionUserService extends GenericReactiveCrudService<DimensionUserEntity, String> { @Autowired private ApplicationEventPublisher eventPublisher; //处理用户被删除时,同步删除维度绑定信息 @EventListener public void handleUserDeleteEntity(UserDeletedEvent event) { event.async(this.createDelete()...
Flux<DimensionUserEntity> cache = Flux.from(stream).doOnNext(DimensionUserEntity::generateId).cache(); Set<Mono<Void>> jobs = ConcurrentHashMap.newKeySet(); return cache .groupBy(DimensionUserEntity::getDimensionTypeId) .flatMap(typeGroup -> { ...
812
306
1,118
<methods>public non-sealed void <init>() ,public ReactiveRepository<org.hswebframework.web.system.authorization.api.entity.DimensionUserEntity,java.lang.String> getRepository() <variables>private ReactiveRepository<org.hswebframework.web.system.authorization.api.entity.DimensionUserEntity,java.lang.String> repository
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/service/DefaultPermissionService.java
DefaultPermissionService
createDelete
class DefaultPermissionService extends GenericReactiveCrudService<PermissionEntity, String> { @Autowired private ApplicationEventPublisher eventPublisher; @Override public Mono<SaveResult> save(Publisher<PermissionEntity> entityPublisher) { return super.save(entityPublisher) ...
return super.createDelete() .onExecute((ignore, i) -> i .flatMap(e -> ClearUserAuthorizationCacheEvent .all() .publish(eventPublisher) .thenReturn(e))); ...
369
62
431
<methods>public non-sealed void <init>() ,public ReactiveRepository<org.hswebframework.web.system.authorization.api.entity.PermissionEntity,java.lang.String> getRepository() <variables>private ReactiveRepository<org.hswebframework.web.system.authorization.api.entity.PermissionEntity,java.lang.String> repository
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/service/DefaultReactiveAuthenticationInitializeService.java
DefaultReactiveAuthenticationInitializeService
handlePermission
class DefaultReactiveAuthenticationInitializeService implements ReactiveAuthenticationInitializeService { @Autowired private ReactiveUserService userService; @Autowired private ReactiveRepository<AuthorizationSettingEntity, String> settingRepository; @Autowired private ReactiveReposit...
Map<String, PermissionEntity> permissionMap = new HashMap<>(); Map<String, SimplePermission> allowed = new HashMap<>(); try { for (PermissionEntity permissionEntity : permissions.values()) { permissionMap.put(permissionEntity.getId(), permissionEntity); ...
945
815
1,760
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/service/DefaultReactiveAuthenticationManager.java
DefaultReactiveAuthenticationManager
authenticate
class DefaultReactiveAuthenticationManager implements ReactiveAuthenticationManagerProvider { @Autowired private ReactiveUserService reactiveUserService; @Autowired private ReactiveAuthenticationInitializeService initializeService; @Autowired(required = false) private ReactiveCacheManager cac...
return request .filter(PlainTextUsernamePasswordAuthenticationRequest.class::isInstance) .switchIfEmpty(Mono.error(() -> new UnsupportedOperationException("不支持的请求类型"))) .map(PlainTextUsernamePasswordAuthenticationRequest.class::cast) .flatMap(pwdR...
484
157
641
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/service/DynamicDimension.java
DynamicDimension
of
class DynamicDimension implements Dimension { private String id; private String name; private DimensionType type; private Map<String, Object> options; public static DynamicDimension of(DimensionEntity entity, DimensionType type) {<FILL_FUNCTION_BODY>} }
DynamicDimension dynamicDimension = new DynamicDimension(); dynamicDimension.setId(entity.getId()); dynamicDimension.setName(entity.getName()); dynamicDimension.setType(type); Map<String, Object> options = new HashMap<>(); options.put("parentId", entity.getParentId()); ...
81
118
199
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/service/PermissionSynchronization.java
PermissionSynchronization
convert
class PermissionSynchronization implements CommandLineRunner { private final ReactiveRepository<PermissionEntity, String> permissionRepository; private final AuthorizeDefinitionCustomizer customizer; private final MergedAuthorizeDefinition definition = new MergedAuthorizeDefinition(); private final ...
PermissionEntity entity = old.getOrDefault(definition.getId(), PermissionEntity.builder() .name(definition.getName()) .describe(definition.getDescription()) .status((byte) 1) .build()); entity.setId(definition.getId()); if (Colle...
777
457
1,234
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/service/RemoveUserTokenWhenUserDisabled.java
RemoveUserTokenWhenUserDisabled
handleStateChangeEvent
class RemoveUserTokenWhenUserDisabled { private final UserTokenManager userTokenManager; @EventListener public void handleStateChangeEvent(UserModifiedEvent event) {<FILL_FUNCTION_BODY>} @EventListener public void handleStateChangeEvent(UserStateChangedEvent event) { if (event.getState() ...
if (event.getUserEntity().getStatus() != null && event.getUserEntity().getStatus() != 1) { event.async( Mono.just(event.getUserEntity().getId()) .flatMap(userTokenManager::signOutByUserId) ); }
140
77
217
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/service/terms/DimensionTerm.java
DimensionTerm
createFragments
class DimensionTerm extends AbstractTermFragmentBuilder { public DimensionTerm() { super("dimension", "和维度关联的数据"); } public static <T extends Conditional<?>> T inject(T query, String column, ...
List<Object> values = convertList(column, term); if (values.isEmpty()) { return EmptySqlFragments.INSTANCE; } List<String> options = term.getOptions(); if (CollectionUtils.isEmpty(options)) { throw new IllegalArgumentException("查询条件错误,正确格式:" + column.get...
340
298
638
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/service/terms/UserDimensionTerm.java
UserDimensionTerm
createFragments
class UserDimensionTerm extends AbstractTermFragmentBuilder { public UserDimensionTerm() { super("in-dimension", "在维度中的用户数据"); } @Override public SqlFragments createFragments(String columnFullName, RDBColumnMetadata column, Term term) {<FILL_FUNCTION_BODY>} }
List<Object> values = convertList(column, term); if (values.isEmpty()) { return EmptySqlFragments.INSTANCE; } PrepareSqlFragments fragments = PrepareSqlFragments.of(); List<String> options = term.getOptions(); if (options.contains("not")) { fra...
87
302
389
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/webflux/WebFluxAuthorizationSettingController.java
WebFluxAuthorizationSettingController
applyAuthentication
class WebFluxAuthorizationSettingController implements ReactiveServiceCrudController<AuthorizationSettingEntity, String> { @Autowired private DefaultAuthorizationSettingService settingService; @Autowired private PermissionProperties permissionProperties; @Override public ReactiveCrudService<A...
AuthorizationSettingEntity setting = ReactiveServiceCrudController.super.applyAuthentication(entity, authentication); return permissionProperties .getFilter() .handleSetting(authentication, setting);
136
50
186
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/webflux/WebFluxDimensionUserController.java
WebFluxDimensionUserController
deleteUserDimension
class WebFluxDimensionUserController implements ReactiveServiceCrudController<DimensionUserEntity, String> { @Autowired private DefaultDimensionUserService dimensionUserService; @Override public ReactiveCrudService<DimensionUserEntity, String> getService() { return dimensionUserService; } ...
return userId .flatMap(userIdList -> dimensionUserService .createDelete() .where(DimensionUserEntity::getDimensionId, dimensionId) .and(DimensionUserEntity::getDimensionTypeId, dimensionType) .in(Dim...
595
88
683
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/webflux/WebFluxPermissionController.java
WebFluxPermissionController
queryForGrant
class WebFluxPermissionController implements ReactiveServiceCrudController<PermissionEntity, String> { @Autowired private DefaultPermissionService permissionService; @Autowired private PermissionProperties permissionProperties; @Override public ReactiveCrudService<PermissionEntity, String> ge...
return Authentication .currentReactive() .flatMapMany(auth -> permissionProperties .getFilter() .doFilter(permissionService.query(query.noPaging()), auth));
344
52
396
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/webflux/WebFluxUserController.java
WebFluxUserController
updateLoginUserInfo
class WebFluxUserController implements ReactiveServiceQueryController<UserEntity, String> { @Autowired private DefaultReactiveUserService reactiveUserService; @PatchMapping @SaveAction @Operation(summary = "保存用户信息") public Mono<Boolean> saveUser(@RequestBody Mono<UserEntity> user) { re...
return Authentication .currentReactive() .switchIfEmpty(Mono.error(UnAuthorizedException::new)) .map(Authentication::getUser) .map(User::getId) .flatMap(userId -> reactiveUserService.updateById(userId, Mono.just(request)).map(integ...
649
90
739
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-oauth2/src/main/java/org/hswebframework/web/oauth2/entity/OAuth2ClientEntity.java
OAuth2ClientEntity
toOAuth2Client
class OAuth2ClientEntity extends GenericEntity<String> { @Column(length = 1024) @Schema(description = "Logo地址") private String logoUrl; @Column(length = 64, nullable = false) @Schema(description = "客户端名称") @NotBlank private String name; @Column(length = 128, nullable = false) @Sch...
OAuth2Client client = new OAuth2Client(); client.setClientSecret(secret); client.setClientId(getId()); client.setName(getName()); client.setRedirectUrl(callbackUri); client.setDescription(description); client.setUserId(userId); return client;
441
83
524
<methods>public non-sealed void <init>() ,public transient java.lang.String toString(java.lang.String[]) ,public java.lang.String toString() <variables>private java.lang.String id
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-dictionary/src/main/java/org/hswebframework/web/dictionary/configuration/DictionaryAutoConfiguration.java
DictionaryServiceConfiguration
compositeDictDefineRepository
class DictionaryServiceConfiguration { @Bean public DefaultDictionaryItemService defaultDictionaryItemService() { return new DefaultDictionaryItemService(); } @Bean public DefaultDictionaryService defaultDictionaryService() { return new DefaultDictionary...
CompositeDictDefineRepository repository = new CompositeDictDefineRepository(); properties.doScanEnum() .stream() .map(CompositeDictDefineRepository::parseEnumDict) .forEach(repository::addDefine); return repository; ...
105
70
175
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-dictionary/src/main/java/org/hswebframework/web/dictionary/configuration/DictionaryProperties.java
DictionaryProperties
doScanEnum
class DictionaryProperties { private Set<String> enumPackages = new HashSet<>(); @SneakyThrows public List<Class> doScanEnum() {<FILL_FUNCTION_BODY>} }
Set<String> packages = new HashSet<>(enumPackages); packages.add("org.hswebframework.web"); CachingMetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(); ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver(); List<...
57
277
334
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-dictionary/src/main/java/org/hswebframework/web/dictionary/entity/DictionaryItemEntity.java
DictionaryItemEntity
getWriteJSONObject
class DictionaryItemEntity extends GenericTreeSortSupportEntity<String> implements EnumDict<String> { //字典id @Column(name = "dict_id", length = 64, updatable = false, nullable = false) @Schema(description = "数据字典ID") private String dictId; //名称 @Column @Schema(description = "选项名称") priva...
JSONObject jsonObject = new JSONObject(); jsonObject.put("id", getId()); jsonObject.put("name", getName()); jsonObject.put("dictId", getDictId()); jsonObject.put("value", getValue()); jsonObject.put("text", getText()); jsonObject.put("ordinal", getOrdinal()); ...
546
190
736
<methods>public non-sealed void <init>() <variables>private java.lang.Integer level,private java.lang.String parentId,private java.lang.String path,private java.lang.Long sortIndex
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-dictionary/src/main/java/org/hswebframework/web/dictionary/service/CompositeDictDefineRepository.java
CompositeDictDefineRepository
handleClearCacheEvent
class CompositeDictDefineRepository extends DefaultDictDefineRepository { @Autowired private DefaultDictionaryService dictionaryService; @Autowired private ReactiveCacheManager cacheManager; @EventListener public void handleClearCacheEvent(ClearDictionaryCacheEvent event) {<FILL_FUNCTION_BODY...
if (StringUtils.isEmpty(event.getDictionaryId())) { cacheManager.<DictDefine>getCache("dic-define") .clear() .doOnSuccess(r -> log.info("clear all dic cache success")) .subscribe(); } else { cacheManager.<Di...
344
139
483
<methods>public non-sealed void <init>() ,public void addDefine(org.hswebframework.web.dict.DictDefine) ,public Flux<org.hswebframework.web.dict.DictDefine> getAllDefine() ,public Mono<org.hswebframework.web.dict.DictDefine> getDefine(java.lang.String) ,public static org.hswebframework.web.dict.DictDefine parseEnumDict...
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-dictionary/src/main/java/org/hswebframework/web/dictionary/service/DefaultDictionaryItemService.java
DefaultDictionaryItemService
fillOrdinal
class DefaultDictionaryItemService extends GenericReactiveCrudService<DictionaryItemEntity, String> implements ReactiveTreeSortEntityService<DictionaryItemEntity, String> { @Autowired public ApplicationEventPublisher eventPublisher; @Override public IDGenerator<String> getIDGenerator() { ...
return Flux .from(publisher) .groupBy(DictionaryItemEntity::getDictId) .flatMap(group -> group .collectList() .flatMapMany(list -> { boolean isAllNull = list.stream().allMatch(item -> ite...
979
207
1,186
<methods>public non-sealed void <init>() ,public ReactiveRepository<org.hswebframework.web.dictionary.entity.DictionaryItemEntity,java.lang.String> getRepository() <variables>private ReactiveRepository<org.hswebframework.web.dictionary.entity.DictionaryItemEntity,java.lang.String> repository
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-dictionary/src/main/java/org/hswebframework/web/dictionary/service/DefaultDictionaryService.java
DefaultDictionaryService
fillDetail
class DefaultDictionaryService extends GenericReactiveCrudService<DictionaryEntity, String> { @Autowired private DefaultDictionaryItemService itemService; @Autowired private ApplicationEventPublisher eventPublisher; @Override public Mono<Integer> insert(Publisher<DictionaryEntity> entityPubli...
return QueryHelper .combineOneToMany( dictionary, DictionaryEntity::getId, itemService.createQuery(), DictionaryItemEntity::getDictId, DictionaryEntity::setItems ...
800
96
896
<methods>public non-sealed void <init>() ,public ReactiveRepository<org.hswebframework.web.dictionary.entity.DictionaryEntity,java.lang.String> getRepository() <variables>private ReactiveRepository<org.hswebframework.web.dictionary.entity.DictionaryEntity,java.lang.String> repository
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-file/src/main/java/org/hswebframework/web/file/FileUploadProperties.java
FileUploadProperties
denied
class FileUploadProperties { private String staticFilePath = "./static"; private String staticLocation = "/static"; //是否使用原始文件名进行存储 private boolean useOriginalFileName = false; private Set<String> allowFiles; private Set<String> denyFiles; private Set<String> allowMediaType; priva...
String suffix = (name.contains(".") ? name.substring(name.lastIndexOf(".") + 1) : "").toLowerCase(Locale.ROOT); boolean defaultDeny = false; if (CollectionUtils.isNotEmpty(denyFiles)) { if (denyFiles.contains(suffix)) { return true; } defaultD...
546
263
809
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-file/src/main/java/org/hswebframework/web/file/service/LocalFileStorageService.java
LocalFileStorageService
saveFile
class LocalFileStorageService implements FileStorageService { private final FileUploadProperties properties; @Override public Mono<String> saveFile(FilePart filePart) { FileUploadProperties.StaticFileInfo info = properties.createStaticSavePath(filePart.filename()); return createStaticFileI...
String fileName = "_temp" + (fileType.startsWith(".") ? fileType : "." + fileType); return createStaticFileInfo(fileName) .flatMap(info -> Mono .fromCallable(() -> { try (ReadableByteChannel input = Channels.newChannel(inputStream); ...
304
268
572
<no_super_class>
hs-web_hsweb-framework
hsweb-framework/hsweb-system/hsweb-system-file/src/main/java/org/hswebframework/web/file/web/ReactiveFileController.java
ReactiveFileController
uploadStatic
class ReactiveFileController { private final FileUploadProperties properties; private final FileStorageService fileStorageService; public ReactiveFileController(FileUploadProperties properties, FileStorageService fileStorageService) { this.properties = properties; this.fileStorageService ...
return partMono .flatMap(part -> { if (part instanceof FilePart) { FilePart filePart = ((FilePart) part); if (properties.denied(filePart.filename(), filePart.headers().getContentType())) { return Mono...
189
131
320
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/Query.java
Query
onOutboundExchangeFinished
class Query<RowT> { /** */ private final UUID initNodeId; /** */ private final UUID id; /** */ protected final Object mux = new Object(); /** */ protected final Set<RunningFragment<RowT>> fragments; /** */ protected final GridQueryCancel cancel; /** */ protected fina...
if (finishedFragmentsCnt.incrementAndGet() == totalFragmentsCnt) { QueryState state0; synchronized (mux) { state0 = state; if (state0 == QueryState.EXECUTING) state = QueryState.CLOSED; } if (state0 == QueryS...
1,697
108
1,805
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ArrayRowHandler.java
ArrayRowHandler
factory
class ArrayRowHandler implements RowHandler<Object[]> { /** */ public static final RowHandler<Object[]> INSTANCE = new ArrayRowHandler(); /** */ private ArrayRowHandler() {} /** {@inheritDoc} */ @Override public Object get(int field, Object[] row) { return row[field]; } /** {@...
int rowLen = types.length; return new RowFactory<Object[]>() { /** {@inheritDoc} */ @Override public RowHandler<Object[]> handler() { return ArrayRowHandler.this; } /** {@inheritDoc} */ @Override public Object[] create() { ...
241
136
377
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/RuntimeSortedIndex.java
Cursor
lowerBound
class Cursor implements GridCursor<Row> { /** List of rows. */ private final List<Row> rows; /** Upper bound. */ private final Row upper; /** Include upper bound. */ private final boolean includeUpper; /** Current row. */ private Row row; /** C...
int low = 0, high = rows.size() - 1, idx = -1; while (low <= high) { int mid = (high - low) / 2 + low; int compRes = comp.compare(rows.get(mid), bound); if (compRes > 0) high = mid - 1; else if (compRes == 0 &...
457
147
604
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/SystemViewScan.java
SystemViewScan
iterator
class SystemViewScan<Row, ViewRow> implements Iterable<Row> { /** */ private final ExecutionContext<Row> ectx; /** */ private final SystemViewTableDescriptorImpl<ViewRow> desc; /** */ private final RowFactory<Row> factory; /** */ private final RangeIterable<Row> ranges; /** Parti...
SystemView<ViewRow> view = desc.systemView(); Iterator<ViewRow> viewIter; if (ranges != null) { assert view instanceof FiltrableSystemView : view; Iterator<RangeCondition<Row>> rangesIter = ranges.iterator(); RangeCondition<Row> range = rangesIter.next(); ...
481
373
854
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/TableScan.java
TableScan
reserve
class TableScan<Row> implements Iterable<Row>, AutoCloseable { /** */ private final GridCacheContext<?, ?> cctx; /** */ private final ExecutionContext<Row> ectx; /** */ private final CacheTableDescriptor desc; /** */ private final RowFactory<Row> factory; /** */ private final...
if (reserved != null) return; GridDhtPartitionTopology top = cctx.topology(); top.readLock(); GridDhtTopologyFuture topFut = top.topologyVersionFuture(); boolean done = topFut.isDone(); if (!done || !(topFut.topologyVersion().compareTo(topVer) >= 0 ...
1,025
530
1,555
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/IgniteRexBuilder.java
IgniteRexBuilder
makeLiteral
class IgniteRexBuilder extends RexBuilder { /** */ public IgniteRexBuilder(RelDataTypeFactory typeFactory) { super(typeFactory); } /** {@inheritDoc} */ @Override protected RexLiteral makeLiteral(@Nullable Comparable o, RelDataType type, SqlTypeName typeName) {<FILL_FUNCTION_BODY>} }
if (o != null && typeName == SqlTypeName.DECIMAL && TypeUtils.hasScale(type)) return super.makeLiteral(((BigDecimal)o).setScale(type.getScale(), RoundingMode.HALF_UP), type, typeName); return super.makeLiteral(o, type, typeName);
95
86
181
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/IgniteScalarFunction.java
IgniteScalarFunction
create
class IgniteScalarFunction extends ReflectiveFunctionBase implements ScalarFunction, ImplementableFunction { /** Implementor. */ private final CallImplementor implementor; /** * Private constructor. */ private IgniteScalarFunction(Method method, CallImplementor implementor) { super(me...
assert Modifier.isStatic(method.getModifiers()); CallImplementor implementor = RexImpTable.createImplementor( new ReflectiveCallNotNullImplementor(method), NullPolicy.NONE, false); return new IgniteScalarFunction(method, implementor);
257
77
334
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/partition/PartitionParameterNode.java
PartitionParameterNode
applySingle
class PartitionParameterNode extends PartitionSingleNode { /** */ private final Class<?> colType; /** */ private final RexDynamicParam param; /** */ public PartitionParameterNode(int cacheId, RexDynamicParam param, Class<?> colType) { super(cacheId); this.param = param; ...
int idx = param.getIndex(); Object val = TypeUtils.toInternal(ctx.dataContext(), ctx.resolveParameter(idx), colType); if (val == null) return null; AffinityService affSvc = ctx.affinityService(); return affSvc.affinity(cacheId()).applyAsInt(val);
140
90
230
<methods>public Collection<java.lang.Integer> apply(org.apache.ignite.internal.processors.query.calcite.exec.partition.PartitionPruningContext) ,public int cacheId() <variables>private final non-sealed int cacheId
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/partition/PartitionSingleNode.java
PartitionSingleNode
apply
class PartitionSingleNode implements PartitionNode { /** */ private final int cacheId; /** */ protected PartitionSingleNode(int cacheId) { this.cacheId = cacheId; } /** {@inheritDoc} */ @Override public Collection<Integer> apply(PartitionPruningContext ctx) {<FILL_FUNCTION_BODY>} ...
Integer part = applySingle(ctx); return part == null ? ImmutableList.of() : ImmutableList.of(part);
143
36
179
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/MergeJoinNode.java
RightJoin
join
class RightJoin<Row> extends MergeJoinNode<Row> { /** Right row factory. */ private final RowHandler.RowFactory<Row> leftRowFactory; /** */ private Row left; /** */ private Row right; /** Used to store similar rows of rights stream in many-to-many join mode. */...
inLoop = true; try { while (requested > 0 && !(left == null && leftInBuf.isEmpty() && waitingLeft != NOT_WAITING) && (right != null || !rightInBuf.isEmpty() || rightMaterialization != null)) { checkState(); if (left ==...
402
902
1,304
<methods>public void close() ,public ExecutionContext<Row> context() ,public Downstream<Row> downstream() ,public void onError(java.lang.Throwable) ,public void onRegister(Downstream<Row>) ,public void register(List<Node<Row>>) ,public void rewind() ,public RelDataType rowType() ,public List<Node<Row>> sources() <varia...
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/MinusNode.java
MinusGrouping
addOnSingle
class MinusGrouping<Row> extends Grouping<Row> { /** */ private MinusGrouping(ExecutionContext<Row> ctx, RowFactory<Row> rowFactory, AggregateType type, boolean all) { super(ctx, rowFactory, type, all); } /** {@inheritDoc} */ @Override protected void addOnSingle(Row ...
int[] cntrs; GroupKey key = key(row); if (setIdx == 0) { // Value in the map will always have 2 elements, first - count of keys in the first set, // second - count of keys in all sets except first. cntrs = groups.computeIfAbsent(key,...
451
195
646
<methods>public void end(int) throws java.lang.Exception,public void push(Row, int) throws java.lang.Exception,public void request(int) throws java.lang.Exception<variables>private int curSrcIdx,private final non-sealed Grouping<Row> grouping,private boolean inLoop,private int requested,private final non-sealed org.apa...
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/ScanNode.java
ScanNode
processNextBatch
class ScanNode<Row> extends AbstractNode<Row> implements SingleNode<Row> { /** */ private final Iterable<Row> src; /** */ @Nullable private final Predicate<Row> filter; /** */ @Nullable private final Function<Row, Row> rowTransformer; /** */ private Iterator<Row> it; /** */ p...
int processed = 0; while (requested > 0 && it.hasNext()) { checkState(); Row r = it.next(); if (filter == null || filter.test(r)) { requested--; if (rowTransformer != null) r = rowTransformer.apply(r); ...
892
213
1,105
<methods>public void close() ,public ExecutionContext<Row> context() ,public Downstream<Row> downstream() ,public void onError(java.lang.Throwable) ,public void onRegister(Downstream<Row>) ,public void register(List<Node<Row>>) ,public void rewind() ,public RelDataType rowType() ,public List<Node<Row>> sources() <varia...
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/SortAggregateNode.java
Group
rowOnReducer
class Group { /** */ private final List<AccumulatorWrapper<Row>> accumWrps; /** */ private final Object[] grpKeys; /** */ private Group(Object[] grpKeys) { this.grpKeys = grpKeys; accumWrps = hasAccumulators() ? accFactory.get() : Collections.em...
Object[] fields = new Object[grpSet.cardinality() + accumWrps.size()]; int i = 0; for (Object grpKey : grpKeys) fields[i++] = grpKey; for (AccumulatorWrapper<Row> accWrp : accumWrps) fields[i++] = accWrp.end(); return rowFa...
575
107
682
<methods><variables>protected final non-sealed Supplier<List<AccumulatorWrapper<Row>>> accFactory,protected final non-sealed boolean hasAggAccum,protected final non-sealed RowFactory<Row> rowFactory,protected final non-sealed org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.AggregateType type
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/message/CalciteMessageFactory.java
CalciteMessageFactory
asMessage
class CalciteMessageFactory implements MessageFactoryProvider { /** {@inheritDoc} */ @SuppressWarnings({"unchecked", "rawtypes"}) @Override public void registerAll(IgniteMessageFactory factory) { for (MessageType type : MessageType.values()) factory.register(type.directType(), (Supplier)...
if (val == null) return null; return new GenericValueMessage(val);
131
28
159
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/message/GenericValueMessage.java
GenericValueMessage
writeTo
class GenericValueMessage implements ValueMessage { /** */ @GridDirectTransient private Object val; /** */ private byte[] serialized; /** */ public GenericValueMessage() { } /** */ public GenericValueMessage(Object val) { this.val = val; } /** {@inheritDoc} *...
writer.setBuffer(buf); if (!writer.isHeaderWritten()) { if (!writer.writeHeader(directType(), fieldsCount())) return false; writer.onHeaderWritten(); } switch (writer.state()) { case 0: if (!writer.writeByteArray("se...
473
114
587
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/message/QueryBatchMessage.java
QueryBatchMessage
prepareMarshal
class QueryBatchMessage implements MarshalableMessage, ExecutionContextAware { /** */ private UUID qryId; /** */ private long fragmentId; /** */ private long exchangeId; /** */ private int batchId; /** */ private boolean last; /** */ @GridDirectTransient private ...
if (mRows != null || rows == null) return; mRows = new ArrayList<>(rows.size()); for (Object row : rows) { ValueMessage mRow = CalciteMessageFactory.asMessage(row); assert mRow != null; mRow.prepareMarshal(ctx); mRows.add(mRow); ...
1,351
99
1,450
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/message/QueryCloseMessage.java
QueryCloseMessage
writeTo
class QueryCloseMessage implements CalciteMessage { /** */ private UUID qryId; /** */ public QueryCloseMessage() { // No-op. } /** */ public QueryCloseMessage(UUID qryId) { this.qryId = qryId; } /** * @return Query ID. */ public UUID queryId() { ...
writer.setBuffer(buf); if (!writer.isHeaderWritten()) { if (!writer.writeHeader(directType(), fieldsCount())) return false; writer.onHeaderWritten(); } switch (writer.state()) { case 0: if (!writer.writeUuid("queryId...
350
114
464
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/message/QueryStartResponse.java
QueryStartResponse
readFrom
class QueryStartResponse implements MarshalableMessage { /** */ private UUID queryId; /** */ private long fragmentId; /** */ @GridDirectTransient private Throwable error; /** */ private byte[] errBytes; /** */ public QueryStartResponse() {} /** */ public QuerySta...
reader.setBuffer(buf); if (!reader.beforeMessageRead()) return false; switch (reader.state()) { case 0: errBytes = reader.readByteArray("errBytes"); if (!reader.isLastRead()) return false; reader.inc...
705
194
899
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/metadata/FragmentMapping.java
FragmentMapping
writeTo
class FragmentMapping implements MarshalableMessage { /** */ @GridDirectCollection(ColocationGroup.class) private List<ColocationGroup> colocationGroups; /** */ public FragmentMapping() { } /** */ private FragmentMapping(ColocationGroup colocationGroup) { this(F.asList(colocati...
writer.setBuffer(buf); if (!writer.isHeaderWritten()) { if (!writer.writeHeader(directType(), fieldsCount())) return false; writer.onHeaderWritten(); } switch (writer.state()) { case 0: if (!writer.writeCollection("c...
1,526
123
1,649
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/metadata/IgniteMdCumulativeCost.java
IgniteMdCumulativeCost
getCumulativeCost
class IgniteMdCumulativeCost implements MetadataHandler<BuiltInMetadata.CumulativeCost> { /** */ public static final RelMetadataProvider SOURCE = ReflectiveRelMetadataProvider.reflectiveSource( BuiltInMethod.CUMULATIVE_COST.method, new IgniteMdCumulativeCost()); /** {@inheritDoc} */ @Override p...
RelOptCost cost = nonCumulativeCost(rel, mq); if (cost.isInfinite()) return cost; RelNode left = rel.getLeft(); RelNode right = rel.getRight(); Set<CorrelationId> corIds = rel.getVariablesSet(); RelOptCost leftCost = mq.getCumulativeCost(left); if...
515
190
705
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/metadata/IgniteMdPredicates.java
IgniteMdPredicates
getPredicates
class IgniteMdPredicates extends RelMdPredicates { /** */ public static final RelMetadataProvider SOURCE = ReflectiveRelMetadataProvider .reflectiveSource(BuiltInMethod.PREDICATES.method, new IgniteMdPredicates()); /** * See {@link RelMdPredicates#getPredicates(org.apache.calcite.rel.RelNode, ...
RexNode predicate = rel.pushUpPredicate(); if (predicate == null) return RelOptPredicateList.EMPTY; return RelOptPredicateList.of(RexUtils.builder(rel), RexUtil.retainDeterministic(RelOptUtil.conjunctions(predicate)));
162
83
245
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/metadata/MappingServiceImpl.java
MappingServiceImpl
executionNodes
class MappingServiceImpl extends AbstractService implements MappingService { /** */ private GridDiscoveryManager discoveryManager; /** * @param ctx Kernal. */ public MappingServiceImpl(GridKernalContext ctx) { super(ctx); } /** * @param discoveryManager Discovery manager...
List<ClusterNode> nodes = new ArrayList<>(discoveryManager.discoCache(topVer).serverNodes()); if (nodeFilter != null) nodes = nodes.stream().filter(nodeFilter).collect(Collectors.toList()); if (single && nodes.size() > 1) nodes = F.asList(nodes.get(ThreadLocalRandom.cu...
217
152
369
<methods>public void onStart(org.apache.ignite.internal.GridKernalContext) ,public void onStop() <variables>protected final non-sealed org.apache.ignite.IgniteLogger log
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/metadata/RelMetadataQueryEx.java
RelMetadataQueryEx
create
class RelMetadataQueryEx extends RelMetadataQuery { static { ConfigurationBuilder cfg = new ConfigurationBuilder() .forPackages("org.apache.ignite.internal.processors.query.calcite.rel") .addClassLoaders(U.gridClassLoader()) .addScanners(new SubTypesScanner()); L...
THREAD_PROVIDERS.set(JaninoRelMetadataProvider.of(metadataProvider)); try { return new RelMetadataQueryEx(); } finally { THREAD_PROVIDERS.remove(); }
567
59
626
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/CacheKey.java
CacheKey
equals
class CacheKey { /** */ private final String schemaName; /** */ private final String query; /** */ private final Object contextKey; /** */ private final Class<?>[] paramTypes; /** * @param schemaName Schema name. * @param query Query string. * @param contextKey Opt...
if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CacheKey cacheKey = (CacheKey)o; if (!schemaName.equals(cacheKey.schemaName)) return false; if (!query.equals(cacheKey.query)) return false; ...
437
135
572
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/PlanExtractor.java
SensitiveDataAwarePlanWriter
removeSensitive
class SensitiveDataAwarePlanWriter extends RelWriterImpl { /** */ public SensitiveDataAwarePlanWriter(PrintWriter pw) { super(pw, SqlExplainLevel.ALL_ATTRIBUTES, false); } /** {@inheritDoc} */ @Override public RelWriter item(String term, @Nullable Object val) { ...
if (val instanceof RexNode) return LiteralRemoveShuttle.INSTANCE.apply((RexNode)val); else if (val instanceof Collection) return F.transform((Collection<?>)val, this::removeSensitive); else if (val instanceof SearchBounds) return ((Sea...
181
101
282
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/AbstractIndexScan.java
AbstractIndexScan
computeSelfCost
class AbstractIndexScan extends ProjectableFilterableTableScan { /** */ protected final String idxName; /** */ protected final List<SearchBounds> searchBounds; /** * Constructor used for deserialization. * * @param input Serialized representation. */ protected AbstractIndex...
double rows = table.getRowCount(); double cost; IgniteTable tbl = table.unwrap(IgniteTable.class); IgniteIndex idx = tbl.getIndex(idxName); double inlineReward = (idx != null && isInlineScan()) ? (0.5d + 0.5d * idx.collation().getFieldCollations().size() / table.g...
584
394
978
<methods>public RelColumnOrigin columnOriginsByRelLocalRef(int) ,public RelOptCost computeSelfCost(RelOptPlanner, RelMetadataQuery) ,public RexNode condition() ,public RelNode copy(RelTraitSet, List<RelNode>) ,public RelDataType deriveRowType() ,public double estimateRowCount(RelMetadataQuery) ,public RelWriter explain...
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/IgniteAggregate.java
IgniteAggregate
estimateMemoryForGroup
class IgniteAggregate extends Aggregate implements IgniteRel { /** */ protected IgniteAggregate( RelOptCluster cluster, RelTraitSet traitSet, RelNode input, ImmutableBitSet groupSet, List<ImmutableBitSet> groupSets, List<AggregateCall> aggCalls ) { sup...
double mem = groupSet.cardinality() * IgniteCost.AVERAGE_FIELD_SIZE; if (!aggCalls.isEmpty()) { double grps = estimateRowCount(mq); double rows = input.estimateRowCount(mq); for (AggregateCall aggCall : aggCalls) { if (aggCall.isDistinct()) ...
582
153
735
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/IgniteHashIndexSpool.java
IgniteHashIndexSpool
computeSelfCost
class IgniteHashIndexSpool extends Spool implements IgniteRel { /** Search row. */ private final List<RexNode> searchRow; /** Keys (number of the columns at the input row) to build hash index. */ private final ImmutableBitSet keys; /** Filters. */ private final RexNode cond; /** Allow NUL...
double rowCnt = mq.getRowCount(getInput()); double bytesPerRow = getRowType().getFieldCount() * IgniteCost.AVERAGE_FIELD_SIZE; double totalBytes = rowCnt * bytesPerRow; double cpuCost = IgniteCost.HASH_LOOKUP_COST; IgniteCostFactory costFactory = (IgniteCostFactory)planner.getC...
870
133
1,003
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/IgniteSender.java
IgniteSender
explainTerms
class IgniteSender extends SingleRel implements IgniteRel { /** */ private final long exchangeId; /** */ private final long targetFragmentId; /** */ private final IgniteDistribution distribution; /** * Creates a Sender. * @param cluster Cluster that this relational expression b...
RelWriter writer = super.explainTerms(pw); if (pw.getDetailLevel() != SqlExplainLevel.ALL_ATTRIBUTES) return writer; return writer .item("exchangeId", exchangeId) .item("targetFragmentId", targetFragmentId) .item("distribution", distribution());...
890
89
979
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/IgniteTableModify.java
IgniteTableModify
copy
class IgniteTableModify extends TableModify implements IgniteRel { /** * Creates a {@code TableModify}. * * <p>The UPDATE operation has format like this: * <blockquote> * <pre>UPDATE table SET iden1 = exp1, ident2 = exp2 WHERE condition</pre> * </blockquote> * * @param clust...
return new IgniteTableModify( getCluster(), traitSet, getTable(), sole(inputs), getOperation(), getUpdateColumnList(), getSourceExpressionList(), isFlattened());
708
63
771
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/IgniteTableScan.java
IgniteTableScan
clone
class IgniteTableScan extends ProjectableFilterableTableScan implements SourceAwareIgniteRel { /** */ private final long sourceId; /** * Constructor used for deserialization. * * @param input Serialized representation. */ public IgniteTableScan(RelInput input) { super(change...
return new IgniteTableScan(sourceId, getCluster(), getTraitSet(), getTable(), projects, condition, requiredColumns);
875
33
908
<methods>public RelColumnOrigin columnOriginsByRelLocalRef(int) ,public RelOptCost computeSelfCost(RelOptPlanner, RelMetadataQuery) ,public RexNode condition() ,public RelNode copy(RelTraitSet, List<RelNode>) ,public RelDataType deriveRowType() ,public double estimateRowCount(RelMetadataQuery) ,public RelWriter explain...
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/IgniteTableSpool.java
IgniteTableSpool
computeSelfCost
class IgniteTableSpool extends Spool implements IgniteRel { /** */ public IgniteTableSpool( RelOptCluster cluster, RelTraitSet traits, Spool.Type readType, RelNode input ) { super(cluster, traits, input, readType, Type.EAGER); } /** * Constructor used fo...
double rowCnt = mq.getRowCount(getInput()); double bytesPerRow = getRowType().getFieldCount() * IgniteCost.AVERAGE_FIELD_SIZE; double totalBytes = rowCnt * bytesPerRow; double cpuCost = rowCnt * IgniteCost.ROW_PASS_THROUGH_COST; IgniteCostFactory costFactory = (IgniteCostFactor...
432
139
571
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/agg/IgniteColocatedAggregateBase.java
IgniteColocatedAggregateBase
deriveDistribution
class IgniteColocatedAggregateBase extends IgniteAggregate implements TraitsAwareIgniteRel { /** */ protected IgniteColocatedAggregateBase( RelOptCluster cluster, RelTraitSet traitSet, RelNode input, ImmutableBitSet groupSet, List<ImmutableBitSet> groupSets, List<...
IgniteDistribution inDistribution = TraitUtils.distribution(inputTraits.get(0)); if (inDistribution.satisfies(IgniteDistributions.single())) return ImmutableList.of(Pair.of(nodeTraits.replace(IgniteDistributions.single()), inputTraits)); if (inDistribution.getType() == RelDistribu...
592
235
827
<methods>public RelOptCost computeSelfCostHash(RelOptPlanner, RelMetadataQuery) ,public RelOptCost computeSelfCostSort(RelOptPlanner, RelMetadataQuery) ,public double estimateMemoryForGroup(RelMetadataQuery) ,public double estimateRowCount(RelMetadataQuery) <variables>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/logical/IgniteLogicalTableScan.java
IgniteLogicalTableScan
create
class IgniteLogicalTableScan extends ProjectableFilterableTableScan { /** Creates a IgniteLogicalTableScan. */ public static IgniteLogicalTableScan create( RelOptCluster cluster, RelTraitSet traits, RelOptTable tbl, @Nullable List<RelHint> hints, @Nullable List<RexNode> p...
return new IgniteLogicalTableScan(cluster, traits, tbl, hints == null ? ImmutableList.of() : hints, proj, cond, requiredColumns);
406
44
450
<methods>public RelColumnOrigin columnOriginsByRelLocalRef(int) ,public RelOptCost computeSelfCost(RelOptPlanner, RelMetadataQuery) ,public RexNode condition() ,public RelNode copy(RelTraitSet, List<RelNode>) ,public RelDataType deriveRowType() ,public double estimateRowCount(RelMetadataQuery) ,public RelWriter explain...
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/set/IgniteIntersect.java
IgniteIntersect
estimateRowCount
class IgniteIntersect extends Intersect implements IgniteSetOp { /** */ IgniteIntersect(RelOptCluster cluster, RelTraitSet traits, List<RelNode> inputs, boolean all) { super(cluster, traits, inputs, all); } /** */ protected IgniteIntersect(RelInput input) { super(TraitUtils.changeTr...
final List<RelNode> inputs = getInputs(); double rows = mq.getRowCount(inputs.get(0)); for (int i = 1; i < inputs.size(); i++) rows = 0.5 * Math.min(rows, mq.getRowCount(inputs.get(i))); return rows;
224
90
314
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/CorrelatedNestedLoopJoinRule.java
CorrelatedNestedLoopJoinRule
convert
class CorrelatedNestedLoopJoinRule extends AbstractIgniteJoinConverterRule { /** */ public static final RelOptRule INSTANCE = new CorrelatedNestedLoopJoinRule(1); /** TODO: https://issues.apache.org/jira/browse/IGNITE-14757 */ public static final RelOptRule INSTANCE_BATCHED = new CorrelatedNestedLoopJo...
final int leftFieldCnt = rel.getLeft().getRowType().getFieldCount(); final RelOptCluster cluster = rel.getCluster(); final RexBuilder rexBuilder = cluster.getRexBuilder(); final RelBuilder relBuilder = relBuilderFactory.create(rel.getCluster(), null); final Set<CorrelationId> c...
321
788
1,109
<methods>public final boolean matches(RelOptRuleCall) <variables>private static final non-sealed org.apache.ignite.internal.processors.query.calcite.hint.HintDefinition[] ALL_HINTS,private static final EnumMap<org.apache.ignite.internal.processors.query.calcite.hint.HintDefinition,org.apache.ignite.internal.processors....
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/FilterConverterRule.java
FilterConverterRule
convert
class FilterConverterRule extends AbstractIgniteConverterRule<LogicalFilter> { /** */ public static final RelOptRule INSTANCE = new FilterConverterRule(); /** */ public FilterConverterRule() { super(LogicalFilter.class, "FilterConverterRule"); } /** {@inheritDoc} */ @Override prote...
RelOptCluster cluster = rel.getCluster(); RelTraitSet traits = cluster .traitSetOf(IgniteConvention.INSTANCE) .replace(IgniteDistributions.single()); Set<CorrelationId> corrIds = RexUtils.extractCorrelationIds(rel.getCondition()); if (!corrIds.isEmpty()) { ...
120
187
307
<methods>public final RelNode convert(RelNode) <variables>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/FilterSpoolMergeToSortedIndexSpoolRule.java
FilterSpoolMergeToSortedIndexSpoolRule
onMatch
class FilterSpoolMergeToSortedIndexSpoolRule extends RelRule<FilterSpoolMergeToSortedIndexSpoolRule.Config> { /** Instance. */ public static final RelOptRule INSTANCE = Config.DEFAULT.toRule(); /** */ private FilterSpoolMergeToSortedIndexSpoolRule(Config cfg) { super(cfg); } /** {@inhe...
final IgniteFilter filter = call.rel(0); final IgniteTableSpool spool = call.rel(1); RelOptCluster cluster = spool.getCluster(); RelTraitSet trait = spool.getTraitSet(); CorrelationTrait filterCorr = TraitUtils.correlation(filter); if (filterCorr.correlated()) ...
415
713
1,128
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/NestedLoopJoinConverterRule.java
NestedLoopJoinConverterRule
convert
class NestedLoopJoinConverterRule extends AbstractIgniteJoinConverterRule { /** */ public static final RelOptRule INSTANCE = new NestedLoopJoinConverterRule(); /** * Creates a converter. */ public NestedLoopJoinConverterRule() { super("NestedLoopJoinConverter", HintDefinition.NL_JOIN)...
RelOptCluster cluster = rel.getCluster(); RelTraitSet outTraits = cluster.traitSetOf(IgniteConvention.INSTANCE); RelTraitSet leftInTraits = cluster.traitSetOf(IgniteConvention.INSTANCE); RelTraitSet rightInTraits = cluster.traitSetOf(IgniteConvention.INSTANCE); RelNode left = co...
139
168
307
<methods>public final boolean matches(RelOptRuleCall) <variables>private static final non-sealed org.apache.ignite.internal.processors.query.calcite.hint.HintDefinition[] ALL_HINTS,private static final EnumMap<org.apache.ignite.internal.processors.query.calcite.hint.HintDefinition,org.apache.ignite.internal.processors....
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/SortAggregateConverterRule.java
MapReduceSortAggregateConverterRule
convert
class MapReduceSortAggregateConverterRule extends AbstractIgniteConverterRule<LogicalAggregate> { /** */ MapReduceSortAggregateConverterRule() { super(LogicalAggregate.class, "MapReduceSortAggregateConverterRule"); } /** {@inheritDoc} */ @Override protected PhysicalN...
// Applicable only for GROUP BY or SELECT DISTINCT if (F.isEmpty(agg.getGroupSet()) || agg.getGroupSets().size() > 1) return null; if (HintUtils.isExpandDistinctAggregate(agg)) return null; RelOptCluster cluster = agg.getCluster(); ...
119
368
487
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/UnionConverterRule.java
UnionConverterRule
onMatch
class UnionConverterRule extends RelRule<UnionConverterRule.Config> { /** Instance. */ public static final RelOptRule INSTANCE = Config.DEFAULT.toRule(); /** */ public UnionConverterRule(Config cfg) { super(cfg); } /** {@inheritDoc} */ @Override public void onMatch(RelOptRuleCall c...
final LogicalUnion union = call.rel(0); RelOptCluster cluster = union.getCluster(); RelTraitSet traits = cluster.traitSetOf(IgniteConvention.INSTANCE); List<RelNode> inputs = Commons.transform(union.getInputs(), input -> convert(input, traits)); RelNode res = new IgniteUnionAl...
311
208
519
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/logical/LogicalOrToUnionRule.java
LogicalOrToUnionRule
onMatch
class LogicalOrToUnionRule extends RelRule<LogicalOrToUnionRule.Config> { /** Rule instance to replace table scans with condition. */ public static final RelOptRule INSTANCE = new LogicalOrToUnionRule(Config.SCAN); /** * Constructor. * * @param config Rule configuration. */ private ...
final RelOptCluster cluster = call.rel(0).getCluster(); List<RexNode> operands = getOrOperands(cluster.getRexBuilder(), getCondition(call)); if (operands == null) return; if (!idxCollationCheck(call, operands)) return; RelNode input = getInput(call); ...
1,382
178
1,560
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/sql/IgniteSqlCreateTable.java
IgniteSqlCreateTable
unparse
class IgniteSqlCreateTable extends SqlCreate { /** */ private final SqlIdentifier name; /** */ private final @Nullable SqlNodeList columnList; /** */ private final @Nullable SqlNode qry; /** */ private final @Nullable SqlNodeList createOptionList; /** */ private static final ...
writer.keyword("CREATE"); writer.keyword("TABLE"); if (ifNotExists) writer.keyword("IF NOT EXISTS"); name.unparse(writer, leftPrec, rightPrec); if (columnList != null) { SqlWriter.Frame frame = writer.startList("(", ")"); for (SqlNode c : co...
681
223
904
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/sql/generated/ParseException.java
ParseException
getMessage
class ParseException extends Exception { /** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates * a new object of this type with the fields "currentToken", * "expectedTokenSequences", and "tokenImage" set. The boolean * fla...
if (!specialConstructor) { return super.getMessage(); } StringBuffer expected = new StringBuffer(); int maxSize = 0; for (int i = 0; i < expectedTokenSequences.length; i++) { if (maxSize < expectedTokenSequences[i].length) { maxSize = expectedTokenSequences[i].length; } ...
1,234
428
1,662
<methods>public void <init>() ,public void <init>(java.lang.String) ,public void <init>(java.lang.Throwable) ,public void <init>(java.lang.String, java.lang.Throwable) <variables>static final long serialVersionUID
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/sql/generated/TokenMgrError.java
TokenMgrError
LexicalError
class TokenMgrError extends Error { /* * Ordinals for various reasons why an Error of this type can be thrown. */ /** * Lexical error occured. */ static final int LEXICAL_ERROR = 0; /** * An attempt wass made to create a second instance of a static token manager. */ static final...
return("Lexical error at line " + errorLine + ", column " + errorColumn + ". Encountered: " + (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + "after : \"" + addEscapes(errorAfter) + "\"");
1,090
104
1,194
<methods>public void <init>() ,public void <init>(java.lang.String) ,public void <init>(java.lang.Throwable) ,public void <init>(java.lang.String, java.lang.Throwable) <variables>static final long serialVersionUID
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/trait/DistributionFunction.java
RandomDistribution
destination
class RandomDistribution extends DistributionFunction { /** */ public static final DistributionFunction INSTANCE = new RandomDistribution(); /** {@inheritDoc} */ @Override public RelDistribution.Type type() { return RelDistribution.Type.RANDOM_DISTRIBUTED; } ...
assert m != null && !F.isEmpty(m.nodeIds()); return new RandomNode<>(m.nodeIds());
143
35
178
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/trait/RewindabilityTrait.java
RewindabilityTrait
satisfies
class RewindabilityTrait implements RelMultipleTrait { /** */ public static final RewindabilityTrait ONE_WAY = canonize(new RewindabilityTrait(false)); /** */ public static final RewindabilityTrait REWINDABLE = canonize(new RewindabilityTrait(true)); /** */ private final boolean rewindable; ...
if (this == trait) return true; if (!(trait instanceof RewindabilityTrait)) return false; RewindabilityTrait trait0 = (RewindabilityTrait)trait; return !trait0.rewindable() || rewindable();
567
80
647
<no_super_class>
apache_ignite
ignite/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/util/ListFieldsQueryCursor.java
ListFieldsQueryCursor
getAll
class ListFieldsQueryCursor<Row> implements FieldsQueryCursor<List<?>>, QueryCursorEx<List<?>> { /** */ private final Iterator<List<?>> it; /** */ private final List<GridQueryFieldMetadata> fieldsMeta; /** */ private final boolean isQry; /** * @param plan Query plan. * @param it...
try { while (it.hasNext()) c.consume(it.next()); } finally { close(); }
553
41
594
<no_super_class>
apache_ignite
ignite/modules/control-utility/src/main/java/org/apache/ignite/internal/commandline/CliCommandInvoker.java
CliCommandInvoker
client
class CliCommandInvoker<A extends IgniteDataTransferObject> extends CommandInvoker<A> implements AutoCloseable { /** Client configuration. */ private GridClientConfiguration clientCfg; /** Client. */ private GridClient client; /** @param cmd Command to execute. */ public CliCommandInvoker(Comm...
if (client != null && client.connected()) return client; client = GridClientFactory.start(clientCfg); // If connection is unsuccessful, fail before doing any operations: if (!client.connected()) { GridClientException lastErr = client.checkLastError(); ...
1,547
129
1,676
<methods>public void <init>(Command<A,?>, A, org.apache.ignite.internal.IgniteEx) ,public R invoke(Consumer<java.lang.String>, boolean) throws org.apache.ignite.internal.client.GridClientException,public boolean prepare(Consumer<java.lang.String>) throws org.apache.ignite.internal.client.GridClientException<variables>p...
apache_ignite
ignite/modules/control-utility/src/main/java/org/apache/ignite/internal/commandline/argument/parser/CLIArgument.java
CLIArgument
optionalArg
class CLIArgument<T> { /** */ private final BiConsumer<String, T> EMPTY = (name, val) -> {}; /** */ private final String name; /** */ private final String usage; /** */ private final boolean isOptional; /** */ private final Class<T> type; /** */ private final Functio...
return new CLIArgument<>(name, usage, true, type, p -> dfltValSupplier.get(), null);
740
34
774
<no_super_class>
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/IgniteJdbcThinDriver.java
IgniteJdbcThinDriver
getPropertyInfo
class IgniteJdbcThinDriver implements Driver { /** Driver instance. */ private static final Driver INSTANCE = new IgniteJdbcThinDriver(); /** Registered flag. */ private static volatile boolean registered; static { register(); } /** Major version. */ private static final int M...
ConnectionPropertiesImpl connProps = new ConnectionPropertiesImpl(); connProps.init(url, info); return connProps.getDriverPropertyInfo();
555
40
595
<no_super_class>
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/binary/BinaryBasicNameMapper.java
BinaryBasicNameMapper
simplifyDotNetGenerics
class BinaryBasicNameMapper implements BinaryNameMapper { /** Default use simple name flag setting. */ public static final boolean DFLT_SIMPLE_NAME = false; /** */ private boolean isSimpleName = DFLT_SIMPLE_NAME; /** * Default constructor. */ public BinaryBasicNameMapper() { ...
// .NET generic part starts with [[ (not valid for Java class name). Clean up every generic part recursively. // Example: Foo.Bar`1[[Baz.Qux`2[[System.String],[System.Int32]]]] int genericIdx = clsName.indexOf("[["); if (genericIdx > 0) clsName = clsName.substring(0, generi...
1,057
200
1,257
<no_super_class>
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/cache/CacheKeyConfiguration.java
CacheKeyConfiguration
equals
class CacheKeyConfiguration implements Serializable { /** */ private static final long serialVersionUID = 0L; /** Type name. */ private String typeName; /** Affinity key field name. */ private String affKeyFieldName; /** * Creates an empty cache key configuration that should be popul...
if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CacheKeyConfiguration that = (CacheKeyConfiguration)o; if (!Objects.equals(typeName, that.typeName)) return false; return Objects.equals(affKeyFieldName...
774
98
872
<no_super_class>
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/cache/CachingProvider.java
CachingProvider
removeClosedManager
class CachingProvider implements javax.cache.spi.CachingProvider { /** */ private static final URI DEFAULT_URI; /** * */ static { URI uri = null; try { URL dfltCfgURL = U.resolveIgniteUrl(IgnitionEx.DFLT_CFG); if (dfltCfgURL != null) u...
synchronized (cacheManagers) { Map<URI, GridFutureAdapter<CacheManager>> uriMap = cacheManagers.get(mgr.getClassLoader()); GridFutureAdapter<CacheManager> fut = uriMap.get(mgr.getURI()); if (fut != null && fut.isDone() && !fut.isFailed()) { try { ...
1,638
168
1,806
<no_super_class>
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/cache/affinity/AffinityKey.java
AffinityKey
affinityKey
class AffinityKey<K> implements Externalizable { /** */ private static final long serialVersionUID = 0L; /** Key. */ @GridToStringInclude(sensitive = true) private K key; /** Affinity key. */ @AffinityKeyMapped @GridToStringInclude(sensitive = true) private Object affKey; /** ...
A.notNull(key, "key"); return (T)(affKey == null ? key : affKey);
1,051
32
1,083
<no_super_class>
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/cache/eviction/AbstractEvictionPolicyFactory.java
AbstractEvictionPolicyFactory
setBatchSize
class AbstractEvictionPolicyFactory<T> implements Factory<T> { /** */ private int maxSize = DFLT_CACHE_SIZE; /** */ private int batchSize = 1; /** */ private long maxMemSize; /** * Sets maximum allowed size of cache before entry will start getting evicted. * * @param max Ma...
A.ensure(batchSize > 0, "batchSize > 0"); this.batchSize = batchSize; return this;
517
37
554
<no_super_class>
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicyFactory.java
FifoEvictionPolicyFactory
create
class FifoEvictionPolicyFactory<K, V> extends AbstractEvictionPolicyFactory<FifoEvictionPolicy<K, V>> { /** */ private static final long serialVersionUID = 0L; /** Constructor. */ public FifoEvictionPolicyFactory() { } /** * Constructor. * * @param maxSize Maximum allowed size o...
FifoEvictionPolicy<K, V> plc = new FifoEvictionPolicy<>(); plc.setBatchSize(getBatchSize()); plc.setMaxMemorySize(getMaxMemorySize()); plc.setMaxSize(getMaxSize()); return plc;
292
77
369
<methods>public non-sealed void <init>() ,public int getBatchSize() ,public long getMaxMemorySize() ,public int getMaxSize() ,public AbstractEvictionPolicyFactory#RAW setBatchSize(int) ,public AbstractEvictionPolicyFactory#RAW setMaxMemorySize(long) ,public AbstractEvictionPolicyFactory#RAW setMaxSize(int) <variables>p...
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/LruEvictionPolicy.java
LruEvictionPolicy
touch
class LruEvictionPolicy<K, V> extends AbstractEvictionPolicy<K, V> implements IgniteMBeanAware { /** */ private static final long serialVersionUID = 0L; /** Queue. */ private final ConcurrentLinkedDeque8<EvictableEntry<K, V>> queue = new ConcurrentLinkedDeque8<>(); /** * Constructs LR...
Node<EvictableEntry<K, V>> node = entry.meta(); // Entry has not been enqueued yet. if (node == null) { while (true) { node = queue.offerLastx(entry); if (entry.putMetaIfAbsent(node) != null) { // Was concurrently added, need to ...
1,226
351
1,577
<methods>public non-sealed void <init>() ,public int getBatchSize() ,public long getCurrentMemorySize() ,public long getMaxMemorySize() ,public int getMaxSize() ,public void onEntryAccessed(boolean, EvictableEntry<K,V>) ,public void readExternal(java.io.ObjectInput) throws java.io.IOException, java.lang.ClassNotFoundEx...
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/cache/query/AbstractContinuousQuery.java
AbstractContinuousQuery
setTimeInterval
class AbstractContinuousQuery<K, V> extends Query<Cache.Entry<K, V>> { /** * Default page size. Size of {@code 1} means that all entries * will be sent to master node immediately (buffering is disabled). */ public static final int DFLT_PAGE_SIZE = 1; /** Maximum default time interval after w...
if (timeInterval < 0) throw new IllegalArgumentException("Time interval can't be negative."); this.timeInterval = timeInterval; return this;
1,626
44
1,670
<no_super_class>
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/cache/query/CacheEntryEventAdapter.java
CacheEntryEventAdapter
getValue
class CacheEntryEventAdapter<K, V> extends CacheEntryEvent<K, V> { /** */ protected CacheEntryEventAdapter(Cache src, EventType evtType) { super(src, evtType); } /** {@inheritDoc} */ @Override public V getValue() {<FILL_FUNCTION_BODY>} /** {@inheritDoc} */ @Override public <T> T un...
EventType evtType = getEventType(); return (evtType == EXPIRED || evtType == REMOVED) ? getOldValue() : getNewValue();
182
47
229
<no_super_class>
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/cache/query/IndexQuery.java
IndexQuery
validateAndSetCriteria
class IndexQuery<K, V> extends Query<Cache.Entry<K, V>> { /** */ private static final long serialVersionUID = 0L; /** Cache Value type. Describes a table within a cache that runs a query. */ private final String valType; /** Index name. */ private final @Nullable String idxName; /** Limit...
if (F.isEmpty(criteria)) return; for (IndexQueryCriterion c: criteria) A.notNull(c, "criteria"); this.criteria = Collections.unmodifiableList(criteria);
1,413
64
1,477
<no_super_class>
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcTypeDefaultHasher.java
JdbcTypeDefaultHasher
hashCode
class JdbcTypeDefaultHasher implements JdbcTypeHasher { /** */ private static final long serialVersionUID = 0L; /** Singleton instance to use. */ public static final JdbcTypeHasher INSTANCE = new JdbcTypeDefaultHasher(); /** {@inheritDoc} */ @Override public int hashCode(Collection<?> values) ...
int hash = 0; for (Object val : values) hash = 31 * hash + (val != null ? val.hashCode() : 0); return hash;
104
50
154
<no_super_class>
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcTypesDefaultTransformer.java
JdbcTypesDefaultTransformer
getColumnValue
class JdbcTypesDefaultTransformer implements JdbcTypesTransformer { /** */ private static final long serialVersionUID = 0L; /** Singleton instance to use. */ public static final JdbcTypesDefaultTransformer INSTANCE = new JdbcTypesDefaultTransformer(); /** {@inheritDoc} */ @Override public Obje...
if (type == String.class) return rs.getString(colIdx); if (type == int.class || type == Integer.class) { int res = rs.getInt(colIdx); return rs.wasNull() && type == Integer.class ? null : res; } if (type == long.class || type == Long.class) { ...
119
879
998
<no_super_class>
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/dialect/DB2Dialect.java
DB2Dialect
mergeQuery
class DB2Dialect extends BasicJdbcDialect { /** */ private static final long serialVersionUID = 0L; /** {@inheritDoc} */ @Override public String loadCacheSelectRangeQuery(String fullTblName, Collection<String> keyCols) { String cols = mkString(keyCols, ","); return String.format( ...
Collection<String> cols = F.concat(false, keyCols, uniqCols); String colsLst = mkString(cols, ", "); String match = mkString(keyCols, new C1<String, String>() { @Override public String apply(String col) { return String.format("t.%s=v.%s", col, col); } ...
249
368
617
<methods>public non-sealed void <init>() ,public java.lang.String escape(java.lang.String) ,public int getFetchSize() ,public int getMaxParameterCount() ,public boolean hasMerge() ,public java.lang.String insertQuery(java.lang.String, Collection<java.lang.String>, Collection<java.lang.String>) ,public java.lang.String ...
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/configuration/BinaryConfiguration.java
BinaryConfiguration
setClassNames
class BinaryConfiguration implements Serializable { /** Serial version uid. */ private static final long serialVersionUID = 0L; /** Default compact footer flag setting. */ public static final boolean DFLT_COMPACT_FOOTER = true; /** ID mapper. */ private BinaryIdMapper idMapper; /** Name m...
if (typeCfgs == null) typeCfgs = new ArrayList<>(clsNames.size()); for (String clsName : clsNames) typeCfgs.add(new BinaryTypeConfiguration(clsName)); return this;
1,118
68
1,186
<no_super_class>
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/configuration/SqlConfiguration.java
SqlConfiguration
setDefaultQueryTimeout
class SqlConfiguration { /** Default SQL query history size. */ public static final int DFLT_SQL_QUERY_HISTORY_SIZE = 1000; /** Default query timeout. */ public static final long DFLT_QRY_TIMEOUT = 0; /** Default timeout after which long query warning will be printed. */ public static final lo...
A.ensure(dfltQryTimeout >= 0 && dfltQryTimeout <= Integer.MAX_VALUE, "default query timeout value should be valid Integer."); this.dfltQryTimeout = dfltQryTimeout; return this;
1,721
68
1,789
<no_super_class>
apache_ignite
ignite/modules/core/src/main/java/org/apache/ignite/events/CacheRebalancingEvent.java
CacheRebalancingEvent
shortDisplay
class CacheRebalancingEvent extends EventAdapter { /** */ private static final long serialVersionUID = 0L; /** Cache name. */ private String cacheName; /** Partition for the event. */ private int part; /** Discovery node. */ private ClusterNode discoNode; /** Discovery event type...
return name() + ": cache=" + CU.mask(cacheName) + ", cause=" + discoveryEventName();
887
34
921
<methods>public void <init>() ,public void <init>(org.apache.ignite.cluster.ClusterNode, java.lang.String, int) ,public int compareTo(org.apache.ignite.events.Event) ,public boolean equals(java.lang.Object) ,public int hashCode() ,public org.apache.ignite.lang.IgniteUuid id() ,public long localOrder() ,public void mess...