org.exoplatform.clouddrive.cmis
Class CMISAPI.ChangesIterator
java.lang.Object
org.exoplatform.clouddrive.utils.ChunkIterator<org.apache.chemistry.opencmis.client.api.ChangeEvent>
org.exoplatform.clouddrive.cmis.CMISAPI.ChangesIterator
- Enclosing class:
- CMISAPI
protected class CMISAPI.ChangesIterator
- extends org.exoplatform.clouddrive.utils.ChunkIterator<org.apache.chemistry.opencmis.client.api.ChangeEvent>
Iterator over set of drive change events from CMIS Change Log. The iterator will fetch all available
events since a given start token.This iterator hides next-chunk logic on
request to the service.
Iterator methods can throw CMISException in case of remote or communication errors.
| Fields inherited from class org.exoplatform.clouddrive.utils.ChunkIterator |
available, fetched, iter, next |
| Methods inherited from class org.exoplatform.clouddrive.utils.ChunkIterator |
available, getAvailable, getFetched |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
changeToken
protected CMISAPI.ChangeToken changeToken
lastFetchedToken
protected CMISAPI.ChangeToken lastFetchedToken
latestChunkToken
protected CMISAPI.ChangeToken latestChunkToken
changes
protected List<org.apache.chemistry.opencmis.client.api.ChangeEvent> changes
firstRun
protected boolean firstRun
hasMoreItems
protected boolean hasMoreItems
cleanNext
protected boolean cleanNext
CMISAPI.ChangesIterator
protected CMISAPI.ChangesIterator(CMISAPI.ChangeToken startChangeToken)
throws CMISException,
org.exoplatform.clouddrive.CloudDriveAccessException
- Throws:
CMISException
org.exoplatform.clouddrive.CloudDriveAccessException
nextChunk
protected Iterator<org.apache.chemistry.opencmis.client.api.ChangeEvent> nextChunk()
throws CMISException,
org.exoplatform.clouddrive.CloudDriveAccessException
- Specified by:
nextChunk in class org.exoplatform.clouddrive.utils.ChunkIterator<org.apache.chemistry.opencmis.client.api.ChangeEvent>
- Throws:
CMISException
org.exoplatform.clouddrive.CloudDriveAccessException
hasNextChunk
protected boolean hasNextChunk()
-
- Specified by:
hasNextChunk in class org.exoplatform.clouddrive.utils.ChunkIterator<org.apache.chemistry.opencmis.client.api.ChangeEvent>
hasNext
public boolean hasNext()
throws org.exoplatform.clouddrive.CloudDriveException
-
- Overrides:
hasNext in class org.exoplatform.clouddrive.utils.ChunkIterator<org.apache.chemistry.opencmis.client.api.ChangeEvent>
- Throws:
org.exoplatform.clouddrive.CloudDriveException
next
public org.apache.chemistry.opencmis.client.api.ChangeEvent next()
throws NoSuchElementException,
org.exoplatform.clouddrive.CloudDriveException
-
- Overrides:
next in class org.exoplatform.clouddrive.utils.ChunkIterator<org.apache.chemistry.opencmis.client.api.ChangeEvent>
- Throws:
NoSuchElementException
org.exoplatform.clouddrive.CloudDriveException
getLastChangeToken
protected CMISAPI.ChangeToken getLastChangeToken()
- Last consumed event change token. Can be the same as start token. Can be
null if no data
received by fetching and if CMIS service doesn't return the chunk latest token.
- Returns:
CMISAPI.ChangeToken last fetched change token, token of last fetched events portion or
null
Copyright © 2003–2015 eXo Platform SAS. All rights reserved.