Class EmptyRemoteIterator<T>
- java.lang.Object
-
- de.aristaflow.adept2.model.common.collection.AbstractRemoteIterator<T,T>
-
- de.aristaflow.adept2.model.common.collection.AbstractTimeTrackingRemoteIterator<T>
-
- de.aristaflow.adept2.model.common.collection.EmptyRemoteIterator<T>
-
- Type Parameters:
T
- The type of the elements should be iterated but no appropriate elements exist.
- All Implemented Interfaces:
RemoteIterator<List<T>>
,de.aristaflow.adept2.model.communication.ServerSideProxy
,de.aristaflow.adept2.model.communication.TimeTrackingSsProxy
,Closeable
,AutoCloseable
public class EmptyRemoteIterator<T> extends AbstractTimeTrackingRemoteIterator<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
closed
Whether this remote iterator has been closed yet.-
Fields inherited from class de.aristaflow.adept2.model.common.collection.AbstractTimeTrackingRemoteIterator
busyThreads, snapshot
-
Fields inherited from class de.aristaflow.adept2.model.common.collection.AbstractRemoteIterator
cleanup, closeables, logger, transformator
-
-
Constructor Summary
Constructors Constructor Description EmptyRemoteIterator()
Deprecated, for removal: This API element is subject to removal in a future version.UseEmptyRemoteIterator(long, long)
instead.EmptyRemoteIterator(long aliveTime, long aliveTimeExtension)
Creates a new remote iterator for an empty result with the designated alive time and the designated alive time extension.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Explicitly closes this iterator which allows to release occupied memory and resources.protected List<T>
getAllImpl()
ImplementsAbstractRemoteIterator.getAll()
without the need to consider result transformation, closeable and alive time tracking.protected List<T>
getNextImpl(int count)
ImplementsAbstractRemoteIterator.getNext(int)
without the need to consider result transformation, closeable and alive time tracking.protected List<T>
getNextImpl(int count, int start)
ImplementsAbstractRemoteIterator.getNext(int, int)
without the need to consider result transformation, closeable and alive time tracking.protected List<T>
getPreviousImpl(int count)
ImplementsAbstractRemoteIterator.getPrevious(int)
without the need to consider result transformation, closeable and alive time tracking.protected boolean
isClosed()
Gets whether this remote iterator has been closed and its data is not available any more.-
Methods inherited from class de.aristaflow.adept2.model.common.collection.AbstractTimeTrackingRemoteIterator
enter, exit, getCloseTime, getRemainingAliveTime, getSnapshotImpl, isBusy, isForwardOnly, isSnapshot, keepAlive, setCloseTime
-
Methods inherited from class de.aristaflow.adept2.model.common.collection.AbstractRemoteIterator
aboutToReturn, closeOnTraversal, getAll, getNext, getNext, getPrevious, setCloseOnTraversal
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.aristaflow.adept2.model.common.collection.RemoteIterator
drop
-
-
-
-
Constructor Detail
-
EmptyRemoteIterator
@Deprecated(since="15.0.0", forRemoval=true) public EmptyRemoteIterator()
Deprecated, for removal: This API element is subject to removal in a future version.UseEmptyRemoteIterator(long, long)
instead.Creates a new remote iterator for an empty result withServerSideProxy.DEFAULT_ALIVE_TIME
as alive time and extension.
-
EmptyRemoteIterator
public EmptyRemoteIterator(long aliveTime, long aliveTimeExtension)
Creates a new remote iterator for an empty result with the designated alive time and the designated alive time extension.- Parameters:
aliveTime
- The time in milliseconds this remote iterator is alive.aliveTimeExtension
- The time in milliseconds to extend the alive time when accessing this remote iterator.
-
-
Method Detail
-
isClosed
protected boolean isClosed()
Description copied from class:AbstractRemoteIterator
Gets whether this remote iterator has been closed and its data is not available any more.- Specified by:
isClosed
in classAbstractRemoteIterator<T,T>
- Returns:
- Whether this remote iterator has been closed and its data is not available any more.
-
getNextImpl
protected List<T> getNextImpl(int count) throws DataSourceException, DataConsistencyException
Description copied from class:AbstractRemoteIterator
ImplementsAbstractRemoteIterator.getNext(int)
without the need to consider result transformation, closeable and alive time tracking.- Specified by:
getNextImpl
in classAbstractRemoteIterator<T,T>
- Throws:
DataSourceException
DataConsistencyException
-
getNextImpl
protected List<T> getNextImpl(int count, int start) throws DataSourceException, DataConsistencyException
Description copied from class:AbstractRemoteIterator
ImplementsAbstractRemoteIterator.getNext(int, int)
without the need to consider result transformation, closeable and alive time tracking.- Specified by:
getNextImpl
in classAbstractRemoteIterator<T,T>
- Throws:
DataSourceException
DataConsistencyException
-
getPreviousImpl
protected List<T> getPreviousImpl(int count) throws DataSourceException, DataConsistencyException
Description copied from class:AbstractRemoteIterator
ImplementsAbstractRemoteIterator.getPrevious(int)
without the need to consider result transformation, closeable and alive time tracking.- Specified by:
getPreviousImpl
in classAbstractRemoteIterator<T,T>
- Throws:
DataSourceException
DataConsistencyException
-
getAllImpl
protected List<T> getAllImpl() throws DataConsistencyException
Description copied from class:AbstractRemoteIterator
ImplementsAbstractRemoteIterator.getAll()
without the need to consider result transformation, closeable and alive time tracking.- Specified by:
getAllImpl
in classAbstractRemoteIterator<T,T>
- Throws:
DataConsistencyException
-
close
public void close() throws IOException
Description copied from interface:RemoteIterator
Explicitly closes this iterator which allows to release occupied memory and resources. Closing will be done implicitly after the alive time has elapsed.
This method may be called several times. Implementors have to take care of this.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceRemoteIterator<T>
- Specified by:
close
in interfacede.aristaflow.adept2.model.communication.ServerSideProxy
- Overrides:
close
in classAbstractRemoteIterator<T,T>
- Throws:
IOException
- If there are problems accessing the underlying data source, anIOException
will be thrown.
-
-