protected class JCRLocalBoxDrive.EventsSync extends Object
| Modifier and Type | Field and Description |
|---|---|
protected BoxAPI |
api
Box API.
|
protected Map<String,org.exoplatform.clouddrive.jcr.JCRLocalCloudFile> |
applied
Applied items in latest state mapped by item id.
|
protected int |
appliedCounter
Counter of applied events in this Sync.
|
protected org.exoplatform.clouddrive.box.BoxAPI.EventsIterator |
events
Events from Box to apply.
|
protected Set<String> |
history
Currently applied history of the drive storage.
|
protected com.box.sdk.BoxEvent |
lastPostponed
The last postponed.
|
protected Long |
localStreamPosition
The local stream position.
|
protected Set<String> |
newHistory
New history with currently applied event ids.
|
protected com.box.sdk.BoxEvent |
nextEvent
The next event.
|
protected LinkedList<com.box.sdk.BoxEvent> |
postponed
Queue of events postponed due to not existing parent or source.
|
protected int |
postponedNumber
The postponed number.
|
protected int |
prevPostponedNumber
The postponed number.
|
protected int |
readCounter
Counter of events read from Box service.
|
protected Set<String> |
removedIds
Ids of removed items.
|
protected Long |
savedStreamPosition
The saved stream position.
|
protected Map<String,com.box.sdk.BoxItem.Info> |
undeleted
Undeleted events by item id.
|
| Modifier | Constructor and Description |
|---|---|
protected |
EventsSync()
Create command for Box synchronization.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.exoplatform.clouddrive.jcr.JCRLocalCloudFile |
applied(String itemId)
Applied.
|
protected void |
apply(org.exoplatform.clouddrive.jcr.JCRLocalCloudFile local)
Apply.
|
protected com.box.sdk.BoxFolder |
fetchChilds(String fileId,
javax.jcr.Node parent)
Fetch childs.
|
protected boolean |
hasNextEvent()
Checks for next event.
|
protected boolean |
hasPostponed()
Checks for postponed.
|
protected com.box.sdk.BoxEvent |
nextEvent()
Next event.
|
protected void |
postpone(com.box.sdk.BoxEvent event)
Postpone.
|
protected void |
preSaveChunk() |
protected com.box.sdk.BoxEvent |
readEvent()
Read event.
|
protected org.exoplatform.clouddrive.jcr.JCRLocalCloudFile |
remove(String itemId,
String itemPath)
Removes the.
|
protected void |
syncFiles() |
protected void |
undelete(com.box.sdk.BoxItem.Info item)
Undelete.
|
protected com.box.sdk.BoxItem.Info |
undeleted(String itemId)
Undeleted.
|
protected final BoxAPI api
protected final LinkedList<com.box.sdk.BoxEvent> postponed
protected final Map<String,org.exoplatform.clouddrive.jcr.JCRLocalCloudFile> applied
protected final Map<String,com.box.sdk.BoxItem.Info> undeleted
protected org.exoplatform.clouddrive.box.BoxAPI.EventsIterator events
protected com.box.sdk.BoxEvent nextEvent
protected com.box.sdk.BoxEvent lastPostponed
protected int prevPostponedNumber
protected int postponedNumber
protected int appliedCounter
protected int readCounter
protected Long savedStreamPosition
protected Long localStreamPosition
protected EventsSync()
throws javax.jcr.RepositoryException,
org.exoplatform.clouddrive.DriveRemovedException
javax.jcr.RepositoryException - the repository exceptionorg.exoplatform.clouddrive.DriveRemovedException - the drive removed exceptionprotected void syncFiles()
throws org.exoplatform.clouddrive.CloudDriveException,
javax.jcr.RepositoryException
org.exoplatform.clouddrive.CloudDriveExceptionjavax.jcr.RepositoryExceptionprotected void preSaveChunk()
throws org.exoplatform.clouddrive.CloudDriveException,
javax.jcr.RepositoryException
org.exoplatform.clouddrive.CloudDriveExceptionjavax.jcr.RepositoryExceptionprotected com.box.sdk.BoxFolder fetchChilds(String fileId, javax.jcr.Node parent) throws org.exoplatform.clouddrive.CloudDriveException, javax.jcr.RepositoryException
fileId - the file idparent - the parentorg.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionjavax.jcr.RepositoryException - the repository exceptionprotected com.box.sdk.BoxEvent readEvent()
throws org.exoplatform.clouddrive.CloudDriveException
org.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionprotected boolean hasNextEvent()
throws org.exoplatform.clouddrive.CloudDriveException
org.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionprotected com.box.sdk.BoxEvent nextEvent()
throws NoSuchElementException,
org.exoplatform.clouddrive.CloudDriveException
NoSuchElementException - the no such element exceptionorg.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionprotected void postpone(com.box.sdk.BoxEvent event)
event - the eventprotected boolean hasPostponed()
protected com.box.sdk.BoxItem.Info undeleted(String itemId)
itemId - the item idprotected void undelete(com.box.sdk.BoxItem.Info item)
item - the itemprotected void apply(org.exoplatform.clouddrive.jcr.JCRLocalCloudFile local)
throws javax.jcr.RepositoryException,
org.exoplatform.clouddrive.CloudDriveException
local - the localjavax.jcr.RepositoryException - the repository exceptionorg.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionprotected org.exoplatform.clouddrive.jcr.JCRLocalCloudFile applied(String itemId)
itemId - the item idprotected org.exoplatform.clouddrive.jcr.JCRLocalCloudFile remove(String itemId, String itemPath) throws javax.jcr.RepositoryException, org.exoplatform.clouddrive.CloudDriveException
itemId - the item iditemPath - the item pathjavax.jcr.RepositoryException - the repository exceptionorg.exoplatform.clouddrive.CloudDriveException - the cloud drive exceptionCopyright © 2003–2018 eXo Platform SAS. All rights reserved.