10 2021 档案
Elasticsearch Query DSL
摘要:DSL 即 Domain Specific Language,是ES的JSON结构查询语法。 这个查询语法总体上包含2个部分: 叶子查询:对字段进行match、term、range等条件匹配 复合查询:复合查询包装其他叶子查询或复合查询 另外要注意在ES中有些查询的开销是比较大的: 需要进行线性扫描 阅读全文
posted @ 2021-10-29 10:52 icodegarden 阅读(142) 评论(0) 推荐(0)
Elasticsearch Search your data
摘要:Search your data 章节主要介绍ES的整体性search的设计,对具体的语法、API如何则需要参考相关章节 Collapse search results 对查询结果进行collapse,可以理解为去重、分组等行为 假设index中有如下文档(为了方便以行表示): user.id me 阅读全文
posted @ 2021-10-28 11:12 icodegarden 阅读(631) 评论(0) 推荐(0)
Elasticsearch Data streams
摘要:data stream的背后可以认为是一组自动创建的index。 数据流允许跨多个index仅追加时间序列数据,同时为请求提供单个index的命名(别名)。数据流非常适合于日志、事件、度量和其他连续生成的数据。 可以直接向数据流提交索引和搜索请求。流自动将请求路由到存储流数据的备份索引。您可以使用索 阅读全文
posted @ 2021-10-27 17:21 icodegarden 阅读(844) 评论(0) 推荐(0)
Elasticsearch Index templates
摘要:Index templates 有2种: component templates 可重用的构建块,用于配置settings, mappings, and aliases。虽然可以使用组件模板构造索引模板,但它们不会直接应用于一组索引。 Index templates 索引模板可以包含componen 阅读全文
posted @ 2021-10-27 16:33 icodegarden 阅读(675) 评论(0) 推荐(0)
Elasticsearch Mapping Field data types字段类型
摘要:Field data types 字段类型 Field data types Binary 接受一个Base64后的字符串,且不能包含\n符,该字段默认不会存储,也不能用于搜索。 PUT my-index-000001 { "mappings": { "properties": { "name": 阅读全文
posted @ 2021-10-27 09:14 icodegarden 阅读(493) 评论(0) 推荐(0)
Elasticsearch Mapping
摘要:Dynamic mapping 动态mapping Dynamic mapping Elasticsearch支持自动index和字段 PUT data/_doc/1 { "count": 5 } 将自动创建data索引(若不存在),自动创建count字段映射 当Elasticsearch在文档中检 阅读全文
posted @ 2021-10-22 14:51 icodegarden 阅读(200) 评论(0) 推荐(0)
Elasticsearch Index模块
摘要:Index配置 https://www.elastic.co/guide/en/elasticsearch/reference/7.15/index-modules.html#index-modules-settings static static的配置只能在 closed index 时才能修改。 阅读全文
posted @ 2021-10-21 17:22 icodegarden 阅读(1105) 评论(0) 推荐(0)
Elasticsearch Node节点角色
摘要:https://www.elastic.co/guide/en/elasticsearch/reference/7.15/modules-node.html 默认情况下,集群中的每个节点都可以处理HTTP和Transport。Transport专门用于节点之间的通信;REST客户端使用HTTP层。 阅读全文
posted @ 2021-10-21 13:33 icodegarden 阅读(338) 评论(0) 推荐(0)
LinkedCaseInsensitiveMap
摘要:LinkedCaseInsensitiveMap LinkedCaseInsensitiveMap<V> implements Map<String, V>, Serializable, Cloneable key忽略大小写的LinkedMap,不支持null作为key private final 阅读全文
posted @ 2021-10-21 10:12 icodegarden 阅读(484) 评论(0) 推荐(0)
FileSystemUtils
摘要:FileSystemUtils #public static boolean deleteRecursively(@Nullable File root) 递归删除,不会抛出异常 #public static boolean deleteRecursively(@Nullable Path root 阅读全文
posted @ 2021-10-21 09:41 icodegarden 阅读(127) 评论(0) 推荐(0)
FileCopyUtils
摘要:FileCopyUtils public static final int BUFFER_SIZE = 4096; #public static int copy(File in, File out) throws IOException #public static void copy(byte[ 阅读全文
posted @ 2021-10-21 09:36 icodegarden 阅读(230) 评论(0) 推荐(0)
FastByteArrayOutputStream
摘要:FastByteArrayOutputStream 性能版的ByteArrayOutputStream,跟ResizableByteArrayOutputStream不同的是他继承的是OutputStream。 使用ArrayDeque<byte[]>作为容器。 他性能高的原因在于写入新数据时,不会 阅读全文
posted @ 2021-10-19 17:56 icodegarden 阅读(6997) 评论(0) 推荐(0)
InstanceFilter、ExceptionTypeFilter
摘要:InstanceFilter 一个简单的匹配器,子类可以覆盖match方法自定义match规则 private final Collection<? extends T> includes; private final Collection<? extends T> excludes; privat 阅读全文
posted @ 2021-10-15 16:48 icodegarden 阅读(40) 评论(0) 推荐(0)
DigestUtils
摘要:DigestUtils 更多更能推荐使用Apache CAMONS #public static byte[] md5Digest(byte[] bytes) #public static byte[] md5Digest(InputStream inputStream) #public stati 阅读全文
posted @ 2021-10-15 16:27 icodegarden 阅读(149) 评论(0) 推荐(0)
PropertiesPersister、DefaultPropertiesPersister、ResourcePropertiesPersister
摘要:PropertiesPersister Properties读写的策略接口 DefaultPropertiesPersister 默认实现类,所有方法都委托java.util.Properties的方法 ResourcePropertiesPersister 支持在spring.properties 阅读全文
posted @ 2021-10-15 16:18 icodegarden 阅读(177) 评论(0) 推荐(0)
ConcurrentReferenceHashMap
摘要:ConcurrentReferenceHashMap 官方描述:一个Concurrent的HashMap,对键和值使用软引用或弱引用。在并发访问时支持更好的性能,可用作Collections.synchronizedMap(new WeakHashMap<K,Reference<V>>())的替代品 阅读全文
posted @ 2021-10-15 11:26 icodegarden 阅读(875) 评论(0) 推荐(0)
ConcurrentLruCache
摘要:ConcurrentLruCache 并发堆内缓存,使用LRU缓存淘汰策略(最近最少使用) private final int sizeLimit; 缓存数量限制,可以是0表示不走缓存 private final Function<K, V> generator; 缓存数据生成 private fi 阅读全文
posted @ 2021-10-14 15:18 icodegarden 阅读(393) 评论(0) 推荐(0)
ConcurrencyThrottleSupport
摘要:ConcurrencyThrottleSupport 用于限制对特定资源的并发访问的支持类。 设计用作基类,子类在其工作流的适当位置调用beforeAccess()和afterAccess()方法。注意,afterAccess通常应该在finally块中调用! 此支持类的默认并发限制为-1(“无界并 阅读全文
posted @ 2021-10-12 14:30 icodegarden 阅读(79) 评论(0) 推荐(0)
CompositeIterator
摘要:CompositeIterator 可包括多个Iterator的Iterator Set<Iterator<E>> iterators = new LinkedHashSet<>(); #public void add(Iterator<E> iterator) 新增一个iterator,同一个it 阅读全文
posted @ 2021-10-12 13:38 icodegarden 阅读(94) 评论(0) 推荐(0)
CollectionUtils
摘要:CollectionUtils static final float DEFAULT_LOAD_FACTOR = 0.75f; #public static boolean isEmpty(@Nullable Collection<?> collection) null或empty #public 阅读全文
posted @ 2021-10-12 13:22 icodegarden 阅读(95) 评论(0) 推荐(0)
ClassUtils
摘要:ClassUtils CGLIB_CLASS_SEPARATOR = "$$"; #public static ClassLoader getDefaultClassLoader() 获取默认ClassLoader,获取结果通常是AppClassLoader。优先级:Thread.currentTh 阅读全文
posted @ 2021-10-09 14:06 icodegarden 阅读(333) 评论(0) 推荐(0)
AutoPopulatingList
摘要:AutoPopulatingList AutoPopulatingList<E> implements List<E>, Serializable 获取元素时 get(int) 若为null则自动创建元素并填充的List 内部的List<E> backingList是实际的容器,add、remove 阅读全文
posted @ 2021-10-08 15:42 icodegarden 阅读(147) 评论(0) 推荐(0)
PathMatcher、AntPathMatcher
摘要:PathMatcher 顶层接口,路径匹配的策略接口 用于org.springframework.core.io.support.PathMatchingResourcePatternResolver、org.springframework.web.servlet.handler.AbstractU 阅读全文
posted @ 2021-10-07 16:26 icodegarden 阅读(1012) 评论(0) 推荐(0)
IdGenerator、AlternativeJdkIdGenerator、JdkIdGenerator、SimpleIdGenerator
摘要:IdGenerator 顶层接口,生成UUID UUID generateId(); AlternativeJdkIdGenerator 使用SecureRandom作为初始种子 SecureRandom secureRandom = new SecureRandom(); byte[] seed 阅读全文
posted @ 2021-10-07 15:46 icodegarden 阅读(279) 评论(0) 推荐(0)
AttributeAccessor、AttributeAccessorSupport
摘要:AttributeAccessor 顶层接口,用于向任意对象附加元数据或从任意对象访问元数据 void setAttribute(String name, @Nullable Object value); @Nullable Object getAttribute(String name); def 阅读全文
posted @ 2021-10-07 15:18 icodegarden 阅读(259) 评论(0) 推荐(0)
spring-core源码目录
摘要:package org.springframework.util; IdGenerator、AlternativeJdkIdGenerator、JdkIdGenerator、SimpleIdGenerator PathMatcher、AntPathMatcher Assert AutoPopulat 阅读全文
posted @ 2021-10-07 15:12 icodegarden 阅读(63) 评论(0) 推荐(0)
AliasRegistry、SimpleAliasRegistry
摘要:AliasRegistry 顶层接口,别名注册 void registerAlias(String name, String alias); void removeAlias(String alias); boolean isAlias(String name); String[] getAlias 阅读全文
posted @ 2021-10-07 15:09 icodegarden 阅读(65) 评论(0) 推荐(0)