FileTable.FileChangeImpl| Modifier and Type | Field and Description |
|---|---|
protected FileSet |
fileSet
The file set for this file table.
|
FIRST_VERSION, INVALID_FILE_ID, IS_KAVA_TEST, listeners, LOGGER, REMOVED_VERSION, storage| Modifier | Constructor and Description |
|---|---|
protected |
FileSetTable(Storage storage,
FileSet fileSet) |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
checkInterrupt()
Check if the calling thread has been interrupted.
|
boolean |
contains(java.net.URL url)
Determine whether this scope contains a URL.
|
protected java.lang.String |
getBaseNameSpaceKey()
Get the base namespace key used to store file table data.
|
abstract java.util.Collection<java.lang.String> |
getDirectoryPaths()
Get the paths of all directories in this table, relative to the file set
root.
|
abstract java.lang.String |
getFileName(int id)
Get the name of a file.
|
abstract java.util.Collection<java.lang.String> |
getFilePaths()
Get the paths of all files in this table, relative to the file set root.
|
abstract java.util.Collection<java.lang.String> |
getFiles(java.lang.String relativePath)
Get the names of all files in a directory.
|
FileSet |
getFileSet()
Get the file set for this table.
|
abstract java.util.Collection<java.net.URL> |
getFileUrls(java.lang.String relativePath)
Get the URLs of all files in a directory.
|
abstract java.util.Collection<Pair<java.net.URL,java.lang.Long>> |
getFileUrlsAndTimestamps(java.lang.String relativePath) |
protected FileSetFilter |
getFilter()
Get the filter used when refreshing this file table.
|
static FileSetTable |
getInstance(Storage storage,
FileSet fileSet)
Get the file table for a file set.
|
abstract java.lang.String |
getParentPath(int id)
Get the path of the parent directory of a file, relative to the root of
this file table.
|
abstract java.lang.String |
getRelativePath(int id)
Get the path of a file relative to the root of this file table.
|
java.lang.String |
getRelativePath(java.net.URL url)
Get the path of a URL relative to the root of this file table.
|
java.lang.String |
getStorageKey()
Get a unique identifier for this file table.
|
abstract java.util.Collection<java.lang.String> |
getSubdirectories(java.lang.String relativePath)
Get the names of all subdirectories in a directory.
|
java.lang.String |
toString() |
abstract void |
visitFiles(FileTableVisitor visitor)
Visit the files in this file table.
|
activate, activateImpl, addFileChangeListener, adjustTimestamps, deactivate, deactivateImpl, delete, getChangesSince, getFileTable, getFileTables, getId, getLastModified, getLength, getRefreshAutomatically, getRefreshOnStartup, getStorage, getURL, invalidate, invalidateAllJars, invalidateDirectory, invalidateDirectory, invalidateDirectoryImpl, invalidateFile, invalidateFileImpl, invalidateJar, invokeListener, invokeListeners, refresh, refreshDirectory, refreshFile, removeFileChangeListenerprotected final FileSet fileSet
public static FileSetTable getInstance(@NotNull Storage storage, @NotNull FileSet fileSet)
storage - the storage where the file table is storedfileSet - the file set defining which files are in the tablepublic FileSet getFileSet()
public java.lang.String getRelativePath(java.net.URL url)
FileTablegetRelativePath in class FileTableurl - the URLnull if the URL cannot be made
relative to this file tablepublic abstract java.lang.String getRelativePath(int id)
throws java.lang.InterruptedException,
java.io.IOException
id - the file idnull if the ID does not exist in this tablejava.lang.InterruptedException - if the calling thread is interruptedjava.io.IOException - if the file table could not be readpublic abstract java.lang.String getParentPath(int id)
throws java.lang.InterruptedException,
java.io.IOException
id - the file idnull if the ID does not exist in this tablejava.lang.InterruptedException - if the calling thread is interruptedjava.io.IOException - if the file table could not be readpublic abstract java.lang.String getFileName(int id)
throws java.lang.InterruptedException,
java.io.IOException
id - the file idnull if the ID does not exist in
this tablejava.lang.InterruptedException - if the calling thread is interruptedjava.io.IOException - if the file table could not be readpublic abstract java.util.Collection<java.lang.String> getFilePaths()
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOException - if the file table could not be readjava.lang.InterruptedException - if the calling thread is interruptedpublic abstract java.util.Collection<java.lang.String> getDirectoryPaths()
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOException - if the file table could not be readjava.lang.InterruptedException - if the calling thread is interruptedpublic abstract java.util.Collection<java.lang.String> getSubdirectories(java.lang.String relativePath)
throws java.io.IOException,
java.lang.InterruptedException
relativePath - the relative path of the directoryjava.io.IOException - if the file table could not be readjava.lang.InterruptedException - if the calling thread is interruptedpublic abstract java.util.Collection<java.lang.String> getFiles(java.lang.String relativePath)
throws java.io.IOException,
java.lang.InterruptedException
relativePath - the relative path of the directoryjava.io.IOException - if the file table could not be readjava.lang.InterruptedException - if the calling thread is interruptedpublic abstract java.util.Collection<java.net.URL> getFileUrls(java.lang.String relativePath)
throws java.io.IOException,
java.lang.InterruptedException
relativePath - the relative path of the directoryjava.io.IOException - if the file table could not be readjava.lang.InterruptedException - if the calling thread is interruptedpublic abstract java.util.Collection<Pair<java.net.URL,java.lang.Long>> getFileUrlsAndTimestamps(java.lang.String relativePath) throws java.io.IOException, java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic abstract void visitFiles(FileTableVisitor visitor) throws java.io.IOException, java.lang.InterruptedException
visitor - the visitorjava.io.IOException - if the file table could not be readjava.lang.InterruptedException - if the calling thread is interruptedpublic boolean contains(java.net.URL url)
FileScopeurl - the URLtrue if this scope contains the URL,
false otherwisepublic java.lang.String getStorageKey()
FileTablegetStorageKey in class FileTableprotected java.lang.String getBaseNameSpaceKey()
protected static void checkInterrupt()
throws java.lang.InterruptedException
java.lang.InterruptedException - if the calling thread has been interruptedpublic java.lang.String toString()
toString in class java.lang.Objectprotected FileSetFilter getFilter()