类 LimitedDataBufferList
- java.lang.Object
- java.util.AbstractCollection<E>
- java.util.AbstractList<E>
- java.util.ArrayList<DataBuffer>
- org.springframework.core.io.buffer.LimitedDataBufferList
- 所有已实现的接口:
Serializable
,Cloneable
,Iterable<DataBuffer>
,Collection<DataBuffer>
,List<DataBuffer>
,RandomAccess
public class LimitedDataBufferList extends ArrayList<DataBuffer>
CustomList
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 otherwisereleaseAndClear()
can be used.- 从以下版本开始:
- 5.1.11
- 作者:
- Rossen Stoyanchev
- 另请参阅:
- 序列化表格
字段概要
从类继承的字段 java.util.AbstractList
modCount
构造器概要
构造器 构造器 说明 LimitedDataBufferList(int maxByteCount)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
add(int index, DataBuffer buffer)
boolean
add(DataBuffer buffer)
boolean
addAll(int index, Collection<? extends DataBuffer> collection)
boolean
addAll(Collection<? extends DataBuffer> collection)
void
clear()
void
releaseAndClear()
DataBuffer
remove(int index)
boolean
remove(Object o)
boolean
removeAll(Collection<?> c)
boolean
removeIf(Predicate<? super DataBuffer> filter)
protected void
removeRange(int fromIndex, int toIndex)
DataBuffer
set(int index, DataBuffer element)
从类继承的方法 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
构造器详细资料
LimitedDataBufferList
public LimitedDataBufferList(int maxByteCount)
方法详细资料
add
public boolean add(DataBuffer buffer)
- 指定者:
add
在接口中Collection<DataBuffer>
- 指定者:
add
在接口中List<DataBuffer>
- 覆盖:
add
在类中ArrayList<DataBuffer>
add
public void add(int index, DataBuffer buffer)
- 指定者:
add
在接口中List<DataBuffer>
- 覆盖:
add
在类中ArrayList<DataBuffer>
addAll
public boolean addAll(Collection<? extends DataBuffer> collection)
- 指定者:
addAll
在接口中Collection<DataBuffer>
- 指定者:
addAll
在接口中List<DataBuffer>
- 覆盖:
addAll
在类中ArrayList<DataBuffer>
addAll
public boolean addAll(int index, Collection<? extends DataBuffer> collection)
- 指定者:
addAll
在接口中List<DataBuffer>
- 覆盖:
addAll
在类中ArrayList<DataBuffer>
remove
public DataBuffer remove(int index)
- 指定者:
remove
在接口中List<DataBuffer>
- 覆盖:
remove
在类中ArrayList<DataBuffer>
remove
public boolean remove(Object o)
- 指定者:
remove
在接口中Collection<DataBuffer>
- 指定者:
remove
在接口中List<DataBuffer>
- 覆盖:
remove
在类中ArrayList<DataBuffer>
removeRange
protected void removeRange(int fromIndex, int toIndex)
- 覆盖:
removeRange
在类中ArrayList<DataBuffer>
removeAll
public boolean removeAll(Collection<?> c)
- 指定者:
removeAll
在接口中Collection<DataBuffer>
- 指定者:
removeAll
在接口中List<DataBuffer>
- 覆盖:
removeAll
在类中ArrayList<DataBuffer>
removeIf
public boolean removeIf(Predicate<? super DataBuffer> filter)
- 指定者:
removeIf
在接口中Collection<DataBuffer>
- 覆盖:
removeIf
在类中ArrayList<DataBuffer>
set
public DataBuffer set(int index, DataBuffer element)
- 指定者:
set
在接口中List<DataBuffer>
- 覆盖:
set
在类中ArrayList<DataBuffer>
clear
public void clear()
- 指定者:
clear
在接口中Collection<DataBuffer>
- 指定者:
clear
在接口中List<DataBuffer>
- 覆盖:
clear
在类中ArrayList<DataBuffer>
releaseAndClear
public void releaseAndClear()