摘要:
在 JavaScript 中,有多种方式可以遍历数据集,下面列出了常用的几种: for 循环 for 循环是一种常见的遍历数据集的方式,可以用于遍历数组、对象等数据类型。例如: const arr = [1, 2, 3]; for (let i = 0; i < arr.length; i++) { 阅读全文
摘要:
一、JAAS配置 Zookeeper配置JAAS zookeeper环境下新增一个配置文件,如zk_server_jass.conf,内容如下: Server { org.apache.kafka.common.security.plain.PlainLoginModule required use 阅读全文
摘要:
ThreadPoolExecutor拒绝策略 CallerRunsPolicy A handler for rejected tasks that runs the rejected task directly in the calling thread of the execute method, 阅读全文
摘要:
泛型概念 泛型的本质是参数化类型,也就是说所操作的数据类型被指定为一个参数。 泛型提供了编译时类型安全检测机制,该机制允许程序员在编译时检测到非法的类型。 java 中泛型标记符 E - Element (在集合中使用,因为集合中存放的是元素) T - Type(Java 类) K - Key(键) 阅读全文