public class CassandraPathDB extends Object implements org.commonjava.storage.pathmapped.spi.PathDB, org.commonjava.storage.pathmapped.spi.PathDBAdmin, Closeable
| Constructor and Description |
|---|
CassandraPathDB(org.commonjava.storage.pathmapped.config.PathMappedStorageConfig config) |
CassandraPathDB(org.commonjava.storage.pathmapped.config.PathMappedStorageConfig config,
com.datastax.driver.core.Session session,
String keyspace)
Deprecated.
|
CassandraPathDB(org.commonjava.storage.pathmapped.config.PathMappedStorageConfig config,
com.datastax.driver.core.Session session,
String keyspace,
int replicationFactor) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
copy(String fromFileSystem,
String fromPath,
String toFileSystem,
String toPath) |
boolean |
delete(String fileSystem,
String path) |
org.commonjava.storage.pathmapped.spi.PathDB.FileType |
exists(String fileSystem,
String path)
Check if the specified path exist.
|
boolean |
existsFile(String fileSystem,
String path) |
long |
getFileLastModified(String fileSystem,
String path) |
long |
getFileLength(String fileSystem,
String path) |
org.commonjava.storage.pathmapped.model.Filesystem |
getFilesystem(String filesystem) |
Set<String> |
getFileSystemContaining(Collection<String> candidates,
String path) |
List<? extends org.commonjava.storage.pathmapped.model.Filesystem> |
getFilesystems() |
String |
getFirstFileSystemContaining(List<String> candidates,
String path)
Get the first fileSystem in the candidates containing the path.
|
org.commonjava.storage.pathmapped.model.PathMap |
getPathMap(String fileSystem,
String path) |
com.datastax.driver.core.Session |
getSession() |
String |
getStorageFile(String fileSystem,
String path) |
void |
insert(String fileSystem,
String path,
Date creation,
Date expiration,
String fileId,
long size,
String fileStorage,
String checksum) |
boolean |
isDirectory(String fileSystem,
String path) |
boolean |
isFile(String fileSystem,
String path) |
List<org.commonjava.storage.pathmapped.model.PathMap> |
list(String fileSystem,
String path,
boolean recursive,
int limit,
org.commonjava.storage.pathmapped.spi.PathDB.FileType fileType) |
List<org.commonjava.storage.pathmapped.model.PathMap> |
list(String fileSystem,
String path,
org.commonjava.storage.pathmapped.spi.PathDB.FileType fileType)
List files under specified path.
|
List<org.commonjava.storage.pathmapped.model.Reclaim> |
listOrphanedFiles(int limit) |
void |
makeDirs(String fileSystem,
String path) |
void |
removeFromReclaim(org.commonjava.storage.pathmapped.model.Reclaim reclaim) |
void |
traverse(String fileSystem,
String path,
java.util.function.Consumer<org.commonjava.storage.pathmapped.model.PathMap> consumer,
int limit,
org.commonjava.storage.pathmapped.spi.PathDB.FileType fileType) |
@Deprecated public CassandraPathDB(org.commonjava.storage.pathmapped.config.PathMappedStorageConfig config, com.datastax.driver.core.Session session, String keyspace)
public CassandraPathDB(org.commonjava.storage.pathmapped.config.PathMappedStorageConfig config,
com.datastax.driver.core.Session session,
String keyspace,
int replicationFactor)
public CassandraPathDB(org.commonjava.storage.pathmapped.config.PathMappedStorageConfig config)
public void close()
close in interface Closeableclose in interface AutoCloseablepublic com.datastax.driver.core.Session getSession()
public Set<String> getFileSystemContaining(Collection<String> candidates, String path)
getFileSystemContaining in interface org.commonjava.storage.pathmapped.spi.PathDBpublic String getFirstFileSystemContaining(List<String> candidates, String path)
getFirstFileSystemContaining in interface org.commonjava.storage.pathmapped.spi.PathDBpublic List<org.commonjava.storage.pathmapped.model.PathMap> list(String fileSystem, String path, org.commonjava.storage.pathmapped.spi.PathDB.FileType fileType)
list in interface org.commonjava.storage.pathmapped.spi.PathDBpublic List<org.commonjava.storage.pathmapped.model.PathMap> list(String fileSystem, String path, boolean recursive, int limit, org.commonjava.storage.pathmapped.spi.PathDB.FileType fileType)
list in interface org.commonjava.storage.pathmapped.spi.PathDBpublic void traverse(String fileSystem, String path, java.util.function.Consumer<org.commonjava.storage.pathmapped.model.PathMap> consumer, int limit, org.commonjava.storage.pathmapped.spi.PathDB.FileType fileType)
traverse in interface org.commonjava.storage.pathmapped.spi.PathDBpublic long getFileLength(String fileSystem, String path)
getFileLength in interface org.commonjava.storage.pathmapped.spi.PathDBpublic org.commonjava.storage.pathmapped.model.PathMap getPathMap(String fileSystem, String path)
getPathMap in interface org.commonjava.storage.pathmapped.spi.PathDBpublic long getFileLastModified(String fileSystem, String path)
getFileLastModified in interface org.commonjava.storage.pathmapped.spi.PathDBpublic org.commonjava.storage.pathmapped.spi.PathDB.FileType exists(String fileSystem, String path)
exists in interface org.commonjava.storage.pathmapped.spi.PathDBpublic boolean existsFile(String fileSystem, String path)
existsFile in interface org.commonjava.storage.pathmapped.spi.PathDBpublic void insert(String fileSystem, String path, Date creation, Date expiration, String fileId, long size, String fileStorage, String checksum)
insert in interface org.commonjava.storage.pathmapped.spi.PathDBpublic boolean isDirectory(String fileSystem, String path)
isDirectory in interface org.commonjava.storage.pathmapped.spi.PathDBpublic boolean isFile(String fileSystem, String path)
isFile in interface org.commonjava.storage.pathmapped.spi.PathDBpublic boolean delete(String fileSystem, String path)
delete in interface org.commonjava.storage.pathmapped.spi.PathDBpublic String getStorageFile(String fileSystem, String path)
getStorageFile in interface org.commonjava.storage.pathmapped.spi.PathDBpublic boolean copy(String fromFileSystem, String fromPath, String toFileSystem, String toPath)
copy in interface org.commonjava.storage.pathmapped.spi.PathDBpublic void makeDirs(String fileSystem, String path)
makeDirs in interface org.commonjava.storage.pathmapped.spi.PathDBpublic List<org.commonjava.storage.pathmapped.model.Reclaim> listOrphanedFiles(int limit)
listOrphanedFiles in interface org.commonjava.storage.pathmapped.spi.PathDBpublic void removeFromReclaim(org.commonjava.storage.pathmapped.model.Reclaim reclaim)
removeFromReclaim in interface org.commonjava.storage.pathmapped.spi.PathDBpublic org.commonjava.storage.pathmapped.model.Filesystem getFilesystem(String filesystem)
getFilesystem in interface org.commonjava.storage.pathmapped.spi.PathDBAdminpublic List<? extends org.commonjava.storage.pathmapped.model.Filesystem> getFilesystems()
getFilesystems in interface org.commonjava.storage.pathmapped.spi.PathDBAdminCopyright © 2019-2022. All Rights Reserved.