1 11 package org.eclipse.team.internal.ccvs.core.resources; 12 13 import org.eclipse.core.resources.IContainer; 14 import org.eclipse.core.resources.IResource; 15 import org.eclipse.core.runtime.IStatus; 16 import org.eclipse.core.runtime.QualifiedName; 17 import org.eclipse.core.runtime.Status; 18 import org.eclipse.team.internal.ccvs.core.*; 19 import org.eclipse.team.internal.ccvs.core.CVSException; 20 import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin; 21 import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo; 22 23 26 abstract class SyncInfoCache { 27 28 static final QualifiedName FOLDER_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "folder-sync"); static final QualifiedName RESOURCE_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "resource-sync"); static final QualifiedName IGNORE_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "folder-ignore"); 34 static final byte[][] EMPTY_RESOURCE_SYNC_INFOS = new byte[0][0]; 35 36 static final QualifiedName IS_DIRTY = new QualifiedName(CVSProviderPlugin.ID, "is-dirty"); static final String IS_DIRTY_INDICATOR = "d"; static final String NOT_DIRTY_INDICATOR = "c"; static final String RECOMPUTE_INDICATOR = "r"; 41 static final IStatus STATUS_OK = new Status(IStatus.OK, CVSProviderPlugin.ID, 0, CVSMessages.ok, null); 42 43 60 abstract FolderSyncInfo getCachedFolderSync(IContainer container, boolean threadSafeAccess) throws CVSException; 61 62 76 abstract void setCachedFolderSync(IContainer container, FolderSyncInfo info, boolean canModifyWorkspace) throws CVSException; 77 78 87 abstract byte[] getCachedSyncBytes(IResource resource, boolean threadSafeAccess) throws CVSException; 88 89 103 abstract void setCachedSyncBytes(IResource resource, byte[] syncBytes, boolean canModifyWorkspace) throws CVSException; 104 105 abstract String getDirtyIndicator(IResource resource, boolean threadSafeAccess) throws CVSException; 106 107 abstract void setDirtyIndicator(IResource resource, String indicator) throws CVSException; 108 109 abstract void flushDirtyCache(IResource resource) throws CVSException; 110 111 abstract boolean isSyncInfoLoaded(IContainer parent) throws CVSException; 112 113 121 abstract boolean isFolderSyncInfoCached(IContainer container) throws CVSException; 122 123 130 abstract boolean isResourceSyncInfoCached(IContainer container) throws CVSException; 131 132 138 abstract void setResourceSyncInfoCached(IContainer container) throws CVSException; 139 140 144 public abstract boolean cachesDirtyState(); 145 } 146 | Popular Tags |