类 LimitedDataBufferList
- 所有已实现的接口:
Serializable,Cloneable,Iterable<DataBuffer>,Collection<DataBuffer>,List<DataBuffer>,RandomAccess
Custom
List to collect data buffers with and enforce a
limit on the total number of bytes buffered. For use with "collect" or
other buffering operators in declarative APIs, e.g. Flux.
Adding elements increases the byte count and if the limit is exceeded,
DataBufferLimitException is raised. clear() resets the
count. Remove and set are not supported.
Note: This class does not automatically release the
buffers it contains. It is usually preferable to use hooks such as
Flux.doOnDiscard(java.lang.Class<R>, java.util.function.Consumer<? super R>) that also take care of cancel and error signals,
or otherwise releaseAndClear() can be used.
- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
- 另请参阅:
-
字段概要
字段从类继承的字段 java.util.AbstractList
modCount -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidadd(int index, DataBuffer buffer) booleanadd(DataBuffer buffer) booleanaddAll(int index, Collection<? extends DataBuffer> collection) booleanaddAll(Collection<? extends DataBuffer> collection) voidclear()private voidvoidremove(int index) booleanbooleanremoveAll(Collection<?> c) booleanremoveIf(Predicate<? super DataBuffer> filter) protected voidremoveRange(int fromIndex, int toIndex) set(int index, DataBuffer element) private voidupdateCount(int bytesToAdd) 从类继承的方法 java.util.ArrayList
clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSize从类继承的方法 java.util.AbstractCollection
containsAll, toString从接口继承的方法 java.util.Collection
parallelStream, stream, toArray从接口继承的方法 java.util.List
containsAll
-
字段详细资料
-
byteCount
private int byteCount -
maxByteCount
private final int maxByteCount
-
-
构造器详细资料
-
LimitedDataBufferList
public LimitedDataBufferList(int maxByteCount)
-
-
方法详细资料
-
add
- 指定者:
add在接口中Collection<DataBuffer>- 指定者:
add在接口中List<DataBuffer>- 覆盖:
add在类中ArrayList<DataBuffer>
-
add
- 指定者:
add在接口中List<DataBuffer>- 覆盖:
add在类中ArrayList<DataBuffer>
-
addAll
- 指定者:
addAll在接口中Collection<DataBuffer>- 指定者:
addAll在接口中List<DataBuffer>- 覆盖:
addAll在类中ArrayList<DataBuffer>
-
addAll
- 指定者:
addAll在接口中List<DataBuffer>- 覆盖:
addAll在类中ArrayList<DataBuffer>
-
updateCount
private void updateCount(int bytesToAdd) -
raiseLimitException
private void raiseLimitException() -
remove
- 指定者:
remove在接口中List<DataBuffer>- 覆盖:
remove在类中ArrayList<DataBuffer>
-
remove
- 指定者:
remove在接口中Collection<DataBuffer>- 指定者:
remove在接口中List<DataBuffer>- 覆盖:
remove在类中ArrayList<DataBuffer>
-
removeRange
protected void removeRange(int fromIndex, int toIndex) - 覆盖:
removeRange在类中ArrayList<DataBuffer>
-
removeAll
- 指定者:
removeAll在接口中Collection<DataBuffer>- 指定者:
removeAll在接口中List<DataBuffer>- 覆盖:
removeAll在类中ArrayList<DataBuffer>
-
removeIf
- 指定者:
removeIf在接口中Collection<DataBuffer>- 覆盖:
removeIf在类中ArrayList<DataBuffer>
-
set
- 指定者:
set在接口中List<DataBuffer>- 覆盖:
set在类中ArrayList<DataBuffer>
-
clear
public void clear()- 指定者:
clear在接口中Collection<DataBuffer>- 指定者:
clear在接口中List<DataBuffer>- 覆盖:
clear在类中ArrayList<DataBuffer>
-
releaseAndClear
public void releaseAndClear()
-