org.apache.tinkerpop.gremlin.structure.io

## Interface Storage

-     public interface Storage

  Storage is a standard API that providers can implement to allow "file-system"-based access to data sources. The methods provided by Storage are similar in form and behavior to standard Linux operating system commands.
  Author:
    Marko A. Rodriguez (http://markorodriguez.com)

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `cp(String sourceLocation, String targetLocation)` Recursively copy all the data sources from the source location to the target location.
    `boolean` | `exists(String location)` 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 location)` List all the data sources at the specified location.
    `boolean` | `rm(String location)` Recursively remove the data source at the specified location.

- - ### Method Detail

    - #### ls

          List<String> ls()

      List all the data sources in the root directory.
      Returns:
        the data sources in the root directory

    - #### ls

          List<String> ls(String location)

      List all the data sources at the specified location.
      Parameters:
        `location` - a location
      Returns:
        the data sources at the specified location

    - #### cp

          boolean cp(String sourceLocation,
                     String targetLocation)

      Recursively copy all the data sources from the source location to the target location.
      Parameters:
        `sourceLocation` - the source location
        `targetLocation` - the target location
      Returns:
        whether data sources were copied

    - #### exists

          boolean exists(String location)

      Determine whether the specified location has a data source.
      Parameters:
        `location` - a location to check
      Returns:
        whether that location has a data source.

    - #### rm

          boolean rm(String location)

      Recursively remove the data source at the specified location.
      Parameters:
        `location` - the location of the data source
      Returns:
        whether a data source was removed.

    - #### head

          default Iterator<String> head(String location)

      Get a string representation of the specified number of lines at the data source location.
      Parameters:
        `location` - the data source location
      Returns:
        an iterator of lines

    - #### head

          Iterator<String> head(String location,
                                int totalLines)

      Get a string representation of the specified number of lines at the data source location.
      Parameters:
        `location` - the data source location
        `totalLines` - the total number of lines to retrieve
      Returns:
        an iterator of lines.

    - #### head

          Iterator<Vertex> head(String location,
                                Class readerClass,
                                int totalLines)

      Get the vertices at the specified graph location.
      Parameters:
        `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
        `totalLines` - the total number of lines of the graph to return
      Returns:
        an iterator of vertices.

    - #### head

          default Iterator<Vertex> head(String location,
                                        Class readerClass)

      Get the vertices at the specified graph location.
      Parameters:
        `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
      Returns:
        an iterator of vertices.

    - #### head

          <K,V> Iterator<KeyValue<K,V>> head(String location,
                                             String memoryKey,
                                             Class readerClass,
                                             int totalLines)

      Get the `KeyValue` data at the specified memory location.
      Parameters:
        `location` - the root location of the data
        `memoryKey` - the memory key
        `readerClass` - the class of the parser that understands the memory format
        `totalLines` - the total number of key-values to return
      Returns:
        an iterator of key-values.

    - #### head

          default <K,V> Iterator<KeyValue<K,V>> head(String location,
                                                     String memoryKey,
                                                     Class readerClass)

      Get the `KeyValue` data at the specified memory location.
      Parameters:
        `location` - the root location of the data
        `memoryKey` - the memory key
        `readerClass` - the class of the parser that understands the memory format
      Returns:
        an iterator of key-values.

Copyright © 2013–2018 Apache Software Foundation. All rights reserved.