Package org.exoplatform.clouddrive.cmis
Class JCRLocalCMISDrive.Sync.TraversingAlgorithm
- java.lang.Object
-
- org.exoplatform.clouddrive.cmis.JCRLocalCMISDrive.Sync.TraversingAlgorithm
-
- Enclosing class:
- JCRLocalCMISDrive.Sync
protected class JCRLocalCMISDrive.Sync.TraversingAlgorithm extends Object
CMIS drive sync based on all remote files traversing: we do compare all remote files with locals by its change log and fetch an item if the logs differ.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classJCRLocalCMISDrive.Sync.TraversingAlgorithm.CMISItemThe Class CMISItem.protected classJCRLocalCMISDrive.Sync.TraversingAlgorithm.FolderReaderThe Class FolderReader.
-
Field Summary
Fields Modifier and Type Field Description protected Queue<JCRLocalCMISDrive.Sync.TraversingAlgorithm.CMISItem>allItemsThe all items.protected Map<String,List<javax.jcr.Node>>allLocalThe all local.protected Queue<Future<org.apache.chemistry.opencmis.client.api.Folder>>readersThe readers.
-
Constructor Summary
Constructors Modifier Constructor Description protectedTraversingAlgorithm()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisReadDone()Checks if is read done.protected Future<org.apache.chemistry.opencmis.client.api.Folder>readItems(String folderId)Read items.protected org.apache.chemistry.opencmis.client.api.FoldersyncChilds(String folderId)Sync childs.protected voidsyncFiles()Sync files.
-
-
-
Field Detail
-
allItems
protected final Queue<JCRLocalCMISDrive.Sync.TraversingAlgorithm.CMISItem> allItems
The all items.
-
-
Method Detail
-
readItems
protected Future<org.apache.chemistry.opencmis.client.api.Folder> readItems(String folderId) throws javax.jcr.RepositoryException, org.exoplatform.services.cms.clouddrives.CloudDriveException
Read items.- Parameters:
folderId- the folder id- Returns:
- the future
- Throws:
javax.jcr.RepositoryException- the repository exceptionorg.exoplatform.services.cms.clouddrives.CloudDriveException- the cloud drive exception
-
syncFiles
protected void syncFiles() throws javax.jcr.RepositoryException, org.exoplatform.services.cms.clouddrives.CloudDriveException, InterruptedExceptionSync files.- Throws:
javax.jcr.RepositoryException- the repository exceptionorg.exoplatform.services.cms.clouddrives.CloudDriveException- the cloud drive exceptionInterruptedException- the interrupted exception
-
isReadDone
protected boolean isReadDone()
Checks if is read done.- Returns:
- true, if is read done
-
syncChilds
protected org.apache.chemistry.opencmis.client.api.Folder syncChilds(String folderId) throws javax.jcr.RepositoryException, org.exoplatform.services.cms.clouddrives.CloudDriveException, InterruptedException
Sync childs.- Parameters:
folderId- the folder id- Returns:
- the folder
- Throws:
javax.jcr.RepositoryException- the repository exceptionorg.exoplatform.services.cms.clouddrives.CloudDriveException- the cloud drive exceptionInterruptedException- the interrupted exception
-
-