File tree 1 file changed +5
-2
lines changed
src/main/java/com/github/phantomthief/collection 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
package com .github .phantomthief .collection ;
2
2
3
+ import java .util .concurrent .ConcurrentHashMap ;
4
+
3
5
import com .github .phantomthief .collection .impl .BatchConsumeBlockingQueueTrigger ;
4
6
import com .github .phantomthief .collection .impl .BatchConsumerTriggerBuilder ;
5
7
import com .github .phantomthief .collection .impl .GenericBatchConsumerTriggerBuilder ;
@@ -40,8 +42,9 @@ public interface BufferTrigger<E> extends AutoCloseable {
40
42
* 推荐用该方法构造{@link SimpleBufferTrigger}实例,适用用大多数场景
41
43
*
42
44
* @param <E> 元素类型
43
- * @param <C> 持有元素的容器类型,如使用默认容器实现(默认实现将{@link java.util.concurrent.ConcurrentHashMap}
44
- * 包装为{@link java.util.Set}),建议传递<code>Set<E></code>.
45
+ * @param <C> 持有元素的容器类型,如使用默认容器实现(不指定 {@link GenericSimpleBufferTriggerBuilder#setContainerEx}),默认为 {@link ConcurrentHashMap#newKeySet()},
46
+ * <p>此时本泛型可以考虑设置为 <code>Set<E></code>
47
+ * <p>注意,强烈不建议使用默认容器,任何时候,都应该优先考虑自行设计容器类型!
45
48
* @return {@link GenericSimpleBufferTriggerBuilder} 实例
46
49
*/
47
50
static <E , C > GenericSimpleBufferTriggerBuilder <E , C > simple () {
You can’t perform that action at this time.
0 commit comments