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.search
Class SearchableRepositorySource.AbstractConnection

    java.lang.Object
      org.modeshape.graph.search.SearchableRepositorySource.AbstractConnection

All Implemented Interfaces:
  RepositoryConnection

Direct Known Subclasses:
  SearchableRepositorySource.ParallelConnection, SearchableRepositorySource.SynchronousConnection

Enclosing class:
  SearchableRepositorySource

    @NotThreadSafe
    protected abstract class SearchableRepositorySource.AbstractConnection

extends Object
implements RepositoryConnection

Constructor Summary
`protected` | `SearchableRepositorySource.AbstractConnection()`

Method Summary
`void` | `close()` Close this connection to signal that it is no longer needed and that any accumulated resources are to be released.
`protected RepositoryConnection` | `delegateConnection()`
`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.

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

Methods inherited from interface org.modeshape.graph.connector.RepositoryConnection
`execute`

Constructor Detail

### SearchableRepositorySource.AbstractConnection

    protected SearchableRepositorySource.AbstractConnection()

Method Detail

### delegateConnection

    protected RepositoryConnection delegateConnection()

### ping

    public boolean ping(long time,
                        TimeUnit unit)
                 throws InterruptedException

  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
  Throws:
    `InterruptedException` - if the thread has been interrupted during the operation
  See Also:
    `RepositoryConnection.ping(long, java.util.concurrent.TimeUnit)`

### 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
  See Also:
    `RepositoryConnection.getDefaultCachePolicy()`

### 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
  See Also:
    `RepositoryConnection.getSourceName()`

### 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
  See Also:
    `RepositoryConnection.getXAResource()`

### 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`
  See Also:
    `RepositoryConnection.close()`

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.