|
What this is
Other links
The source code/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans. The Initial Developer of the Original
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
* Microsystems, Inc. All Rights Reserved.
*/
package org.netbeans.modules.vcscore.caching;
import java.io.File;
import java.util.Collection;
import java.util.Set;
import org.netbeans.modules.vcscore.cache.CacheFile;
import org.netbeans.modules.vcscore.cache.CacheDir;
import org.netbeans.modules.vcscore.cache.CachedFileSystem;
/**
* The provider of caching of VCS file attributes information.
*
* @author Martin Entlicher
*/
public interface FileCacheProvider extends CachedFileSystem {
/**
* returns the id string of the cache to be used.
*/
public String getCacheId();
/**
* Creates an instance of a weak reference to the fileobject.
* To be used by the filesystem using the cache and it's method createReference().
* The implementation of this method should call CacheHandler's createReference() generally.
* (Otherwise only if you need to subclass the CacheReference class for some reason.)
*/
public java.lang.ref.Reference createReference(org.openide.filesystems.FileObject fo);
/**
* this method sets the filesystems cvs root. eg. if you have your sources under
* c:\src\nb, that's your FSRoot.
*/
public void setFSRoot(String fsRoot);
/**
* sets the relative mount point from the filesystem. rel mount point is the rest of the path
* to the filesystem root, after you've substracted the FSRoot.
* eg. if you have the filesystem mounted at c:\src\nb\javacvs\src
*then the c:\src\nb is the fsRoot, and the javacvs\src part is the relative mountpoint.
*/
public void setRelativeMountPoint(String relativeMountPoint);
public boolean isDir(String path);
public boolean isFile(String path);
public CacheFile getFile(String path);
public CacheDir getDir(String path);
public String[] getFilesAndSubdirs(String path);
public void readDir(String path);
public void readDirFromDiskCache(String path);
public void readDirFromDiskCache(String path, Object cacheLocker);
public void refreshCacheDir(String path);
public void refreshCacheDirRecursive(String path);
/**
* Refresh the directory only from the cached data (usually located on the disk).
*/
public void refreshDirFromDiskCache(File fpath);
public void addFolder(String path);
public void addFile(String path);
public void rename(String oldPath, String newPath);
public void remove(String path, boolean wasDirectory);
/**
* Set the status of files, if they exist in the cache and their last status
* is not contained in a specified collection. This method is defined mainly
* because of performance reasons, when many files need to be set to specified
* status.
* @param folderPath the folder of files
* @param fileNames the list of file names
* @param status the status to set
* @param notModifiableStates the collection of statuses, that will not be changed
* or
|
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.