public interface Storage
<pattern> ::= <absolute pattern> | <relative pattern> <absolute path> ::= / [<relative pattern>] <relative path> ::= <name> {/ <name>} [/ <name pattern>] [/] | <name pattern> [/]
Modifier and Type | Field and Description |
---|---|
static String |
FILE_SEPARATOR
The file and directory names separator in this uniform UNIX-like abstract file system
|
static String |
ROOT_DIRECTORY |
Modifier and Type | Method and Description |
---|---|
boolean |
cp(String sourcePattern,
String targetDirectory)
Recursively copy all the data sources from the source location to the target location.
|
boolean |
exists(String pattern)
Determine whether the specified location has a data source.
|
default Iterator<String> |
head(String location)
Get a string representation of the specified number of lines at the data source location.
|
default Iterator<Vertex> |
head(String location,
Class readerClass)
Get the vertices at the specified graph location.
|
Iterator<Vertex> |
head(String location,
Class readerClass,
int totalLines)
Get the vertices at the specified graph location.
|
Iterator<String> |
head(String location,
int totalLines)
Get a string representation of the specified number of lines at the data source location.
|
default <K,V> Iterator<KeyValue<K,V>> |
head(String location,
String memoryKey,
Class readerClass)
Get the
KeyValue data at the specified memory location. |
<K,V> Iterator<KeyValue<K,V>> |
head(String location,
String memoryKey,
Class readerClass,
int totalLines)
Get the
KeyValue data at the specified memory location. |
List<String> |
ls()
List all the data sources in the root directory.
|
List<String> |
ls(String pattern)
List all the files (e.g.
|
boolean |
rm(String pattern)
Recursively remove the file (data source) at the specified location.
|
static String |
toPath(File path) |
static String |
toPath(String path) |
static final String FILE_SEPARATOR
static final String ROOT_DIRECTORY
List<String> ls()
ls(String)
List<String> ls(String pattern)
pattern
- non-null pattern specifying a set of files and directories. Cases:boolean cp(String sourcePattern, String targetDirectory)
sourcePattern
- non-null pattern specifying a set of files and directories. Cases:targetDirectory
- non-null directory where to copy toboolean exists(String pattern)
pattern
- non-null pattern specifying a set of files and directories. Examples:boolean rm(String pattern)
pattern
- non-null pattern specifying a set of files and directories. Examples:default Iterator<String> head(String location)
location
- the data source locationIterator<String> head(String location, int totalLines)
location
- the data source locationtotalLines
- the total number of lines to retrieveIterator<Vertex> head(String location, Class readerClass, int totalLines)
location
- the location of the graph (or the root location and search will be made)readerClass
- the class of the parser that understands the graph formattotalLines
- the total number of lines of the graph to returndefault Iterator<Vertex> head(String location, Class readerClass)
location
- the location of the graph (or the root location and search will be made)readerClass
- the class of the parser that understands the graph format<K,V> Iterator<KeyValue<K,V>> head(String location, String memoryKey, Class readerClass, int totalLines)
KeyValue
data at the specified memory location.location
- the root location of the datamemoryKey
- the memory keyreaderClass
- the class of the parser that understands the memory formattotalLines
- the total number of key-values to returndefault <K,V> Iterator<KeyValue<K,V>> head(String location, String memoryKey, Class readerClass)
KeyValue
data at the specified memory location.location
- the root location of the datamemoryKey
- the memory keyreaderClass
- the class of the parser that understands the memory formatstatic String toPath(File path)
path
- non-null local file pathStorage
file system.Copyright © 2013–2021 Apache Software Foundation. All rights reserved.