Neo4j

org.neo4j.backup
Class BackupExtensionService

java.lang.Object
  extended by org.neo4j.helpers.Service
      extended by org.neo4j.backup.BackupExtensionService

public abstract class BackupExtensionService
extends Service

This class provides a basic interface for backup sources to implement their own resolution algorithms. The backup tool in general expects a location to backup from but the format of it is in general specific to the source database, while the OnlineBackup class expects a valid socket to connect to and perform the backup. For that reason each implementation is expected to provide a translator from its specific addressing scheme to a valid host:port combination.

The prime consumer of this API is the HA component, where a set of cluster members can be passed as targets to backup but only one will be used. It is expected therefore that a Service implementation will be present on the classpath that will properly communicate with the cluster and find the master.

The URI is strictly expected to have a scheme component, matching the name of the service implementation used to resolve it. The same holds for the default case, with a scheme name of "single". The scheme specific fragment after that will be the responsibility of the plugin to resolve to a valid host. In any case, the resolve method is expected to return a valid URI, with a scheme which is the same as the one passed to it (ie the service's name).


Nested Class Summary
 
Nested classes/interfaces inherited from class org.neo4j.helpers.Service
Service.CaseInsensitiveService, Service.Implementation
 
Constructor Summary
BackupExtensionService(String name)
           
 
Method Summary
abstract  URI resolve(URI from, Args arguments, org.neo4j.kernel.logging.Logging logging)
          The source specific target to valid backup host translation method.
 
Methods inherited from class org.neo4j.helpers.Service
equals, getKeys, hashCode, load, load, matches, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BackupExtensionService

public BackupExtensionService(String name)
Method Detail

resolve

public abstract URI resolve(URI from,
                            Args arguments,
                            org.neo4j.kernel.logging.Logging logging)
The source specific target to valid backup host translation method.

Parameters:
from - The URI as passed in the command line
arguments - all arguments to the backup command
Returns:
A URI where the scheme is the service's name and there exist host and port parts that point to a backup source.

Neo4j

Copyright © 2002-2014 The Neo4j Graph Database Project. All Rights Reserved.