|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.clouddrive.box.JCRLocalBoxDrive.EventsSync
protected class JCRLocalBoxDrive.EventsSync
Sync algorithm for Box drive based on drive changes obtained from Events service http://developers.box.com/docs/#events.
| Field Summary | |
|---|---|
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.boxjavalibv2.dao.BoxEvent |
lastPostponed
|
protected Set<String> |
newHistory
New history with currently applied event ids. |
protected com.box.boxjavalibv2.dao.BoxEvent |
nextEvent
|
protected LinkedList<com.box.boxjavalibv2.dao.BoxEvent> |
postponed
Queue of events postponed due to not existing parent or source. |
protected int |
postponedNumber
|
protected int |
prevPostponedNumber
|
protected int |
readCounter
Counter of events read from Box service. |
protected Set<String> |
removedIds
Ids of removed items. |
protected Map<String,com.box.boxjavalibv2.dao.BoxItem> |
undeleted
Undeleted events by item id. |
| Fields inherited from interface org.exoplatform.clouddrive.CloudDrive.Command |
|---|
COMPLETE |
| Constructor Summary | |
|---|---|
protected |
JCRLocalBoxDrive.EventsSync()
Create command for Box synchronization. |
| Method Summary | |
|---|---|
protected org.exoplatform.clouddrive.jcr.JCRLocalCloudFile |
applied(String itemId)
|
protected void |
apply(org.exoplatform.clouddrive.jcr.JCRLocalCloudFile local)
|
protected com.box.boxjavalibv2.dao.BoxFolder |
fetchChilds(String fileId,
javax.jcr.Node parent)
|
protected boolean |
hasNextEvent()
|
protected boolean |
hasPostponed()
|
protected boolean |
isRemoved(String itemId)
|
protected com.box.boxjavalibv2.dao.BoxEvent |
nextEvent()
|
protected void |
postpone(com.box.boxjavalibv2.dao.BoxEvent event)
|
protected com.box.boxjavalibv2.dao.BoxEvent |
readEvent()
|
protected org.exoplatform.clouddrive.jcr.JCRLocalCloudFile |
remove(String itemId,
String itemPath)
|
protected void |
syncFiles()
|
protected void |
undelete(com.box.boxjavalibv2.dao.BoxItem item)
|
protected com.box.boxjavalibv2.dao.BoxItem |
undeleted(String itemId)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final BoxAPI api
protected final Set<String> history
protected final Set<String> newHistory
protected final LinkedList<com.box.boxjavalibv2.dao.BoxEvent> postponed
protected final Map<String,org.exoplatform.clouddrive.jcr.JCRLocalCloudFile> applied
protected final Map<String,com.box.boxjavalibv2.dao.BoxItem> undeleted
protected final Set<String> removedIds
protected org.exoplatform.clouddrive.box.BoxAPI.EventsIterator events
protected com.box.boxjavalibv2.dao.BoxEvent nextEvent
protected com.box.boxjavalibv2.dao.BoxEvent lastPostponed
protected int prevPostponedNumber
protected int postponedNumber
protected int appliedCounter
protected int readCounter
| Constructor Detail |
|---|
protected JCRLocalBoxDrive.EventsSync()
throws javax.jcr.RepositoryException,
org.exoplatform.clouddrive.DriveRemovedException
javax.jcr.RepositoryException
org.exoplatform.clouddrive.DriveRemovedException| Method Detail |
|---|
protected void syncFiles()
throws org.exoplatform.clouddrive.CloudDriveException,
javax.jcr.RepositoryException
org.exoplatform.clouddrive.CloudDriveException
javax.jcr.RepositoryException
protected com.box.boxjavalibv2.dao.BoxFolder fetchChilds(String fileId,
javax.jcr.Node parent)
throws org.exoplatform.clouddrive.CloudDriveException,
javax.jcr.RepositoryException
org.exoplatform.clouddrive.CloudDriveException
javax.jcr.RepositoryException
protected com.box.boxjavalibv2.dao.BoxEvent readEvent()
throws org.exoplatform.clouddrive.CloudDriveException
org.exoplatform.clouddrive.CloudDriveException
protected boolean hasNextEvent()
throws org.exoplatform.clouddrive.CloudDriveException
org.exoplatform.clouddrive.CloudDriveException
protected com.box.boxjavalibv2.dao.BoxEvent nextEvent()
throws NoSuchElementException,
org.exoplatform.clouddrive.CloudDriveException
NoSuchElementException
org.exoplatform.clouddrive.CloudDriveExceptionprotected void postpone(com.box.boxjavalibv2.dao.BoxEvent event)
protected boolean hasPostponed()
protected com.box.boxjavalibv2.dao.BoxItem undeleted(String itemId)
protected void undelete(com.box.boxjavalibv2.dao.BoxItem item)
protected void apply(org.exoplatform.clouddrive.jcr.JCRLocalCloudFile local)
protected org.exoplatform.clouddrive.jcr.JCRLocalCloudFile applied(String itemId)
protected org.exoplatform.clouddrive.jcr.JCRLocalCloudFile remove(String itemId,
String itemPath)
protected boolean isRemoved(String itemId)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||