T - the generic type of the items in the streampublic abstract class AbstractObjectStreamBuffer<T> extends AbstractStreamingBuffer implements ObjectStreamBuffer<T>
ObjectStreamBufferAbstractStreamingBuffer.LockReleaserclosed, readLock, writeLock| Constructor and Description |
|---|
AbstractObjectStreamBuffer(StreamingIterator<T> stream) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Releases all the resources held by this buffer.
|
protected abstract void |
doClose() |
Optional<Bucket<T>> |
getBucketFor(Position position)
Returns the
Bucket for the given position |
protected Bucket<T> |
getCurrentBucket() |
protected abstract Optional<Bucket<T>> |
getPresentBucket(Position position) |
int |
getSize() |
boolean |
hasNext(long i) |
void |
initialise()
Initialises this buffer.
|
protected abstract void |
initialize(Optional<Position> maxPosition,
Bucket<T> initialBucket) |
protected abstract Bucket<T> |
onBucketOverflow(Bucket<T> overflownBucket) |
protected void |
setCurrentBucket(Bucket<T> bucket) |
protected void |
setMaxPosition(Position maxPosition) |
protected abstract void |
validateMaxBufferSizeNotExceeded(int instancesCount) |
checkNotClosed, closeSafely, withReadLock, withWriteLockclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoPositionpublic AbstractObjectStreamBuffer(StreamingIterator<T> stream)
public final void initialise()
ObjectStreamBufferinitialise in interface ObjectStreamBuffer<T>protected abstract void initialize(Optional<Position> maxPosition, Bucket<T> initialBucket)
public Optional<Bucket<T>> getBucketFor(Position position)
ObjectStreamBufferBucket for the given positiongetBucketFor in interface ObjectStreamBuffer<T>position - the bucket's positionpublic int getSize()
getSize in interface org.mule.runtime.api.streaming.HasSizepublic final boolean hasNext(long i)
hasNext in interface ObjectStreamBuffer<T>i - a position in the streamprotected abstract void validateMaxBufferSizeNotExceeded(int instancesCount)
public final void close()
ObjectStreamBufferclose in interface ObjectStreamBuffer<T>protected abstract void doClose()
protected void setMaxPosition(Position maxPosition)
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.