Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.graph.connector.path
Class PathRepositoryConnection

    java.lang.Object
      org.modeshape.graph.connector.path.PathRepositoryConnection

All Implemented Interfaces:
  RepositoryConnection

    public class PathRepositoryConnection

extends Object
implements RepositoryConnection

Constructor Summary
`PathRepositoryConnection(PathRepositorySource source, PathRepository repository)`

Method Summary
`void` | `close()` Close this connection to signal that it is no longer needed and that any accumulated resources are to be released.
`void` | `execute(ExecutionContext context, Request request)` Execute the supplied commands against this repository source.
`CachePolicy` | `getDefaultCachePolicy()` Get the default cache policy for this repository.
`String` | `getSourceName()` Get the name for this repository source.
`XAResource` | `getXAResource()` Return the transactional resource associated with this connection.
`boolean` | `ping(long time, TimeUnit unit)` Ping the underlying system to determine if the connection is still valid and alive.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PathRepositoryConnection

    public PathRepositoryConnection(PathRepositorySource source,
                                    PathRepository repository)

Method Detail

### getSourceName

    public String getSourceName()

  Get the name for this repository source. This value should be the same as that `returned` by the same `RepositorySource` that created this connection.

  Specified by:
    `getSourceName` in interface `RepositoryConnection`
  Returns:
    the identifier; never null or empty

### getDefaultCachePolicy

    public CachePolicy getDefaultCachePolicy()

  Get the default cache policy for this repository. If none is provided, a global cache policy will be used.

  Specified by:
    `getDefaultCachePolicy` in interface `RepositoryConnection`
  Returns:
    the default cache policy

### getXAResource

    public XAResource getXAResource()

  Return the transactional resource associated with this connection. The transaction manager will use this resource to manage the participation of this connection in a distributed transaction.

  Specified by:
    `getXAResource` in interface `RepositoryConnection`
  Returns:
    the XA resource, or null if this connection is not aware of distributed transactions

### ping

    public boolean ping(long time,
                        TimeUnit unit)

  Ping the underlying system to determine if the connection is still valid and alive.

  Specified by:
    `ping` in interface `RepositoryConnection`
  Parameters:
    `time` - the length of time to wait before timing out
    `unit` - the time unit to use; may not be null
  Returns:
    true if this connection is still valid and can still be used, or false otherwise

### close

    public void close()

  Close this connection to signal that it is no longer needed and that any accumulated resources are to be released.

  Specified by:
    `close` in interface `RepositoryConnection`

### execute

    public void execute(ExecutionContext context,
                        Request request)
                 throws RepositorySourceException

  Execute the supplied commands against this repository source.

  Specified by:
    `execute` in interface `RepositoryConnection`
  Parameters:
    `context` - the environment in which the commands are being executed; never null
    `request` - the request to be executed; never null
  Throws:
    `RepositorySourceException` - if there is a problem loading the node data
  See Also:
    `RepositoryConnection.execute(org.modeshape.graph.ExecutionContext, org.modeshape.graph.request.Request)`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`
  See Also:
    `Object.toString()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.