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

## org.tmatesoft.svn.core.wc
Interface ISVNRepositoryPool

All Known Implementing Classes:
  DefaultSVNRepositoryPool, SVNClientManager

public interface ISVNRepositoryPool

The ISVNRepositoryPool interface is used by SVN*Client objects to create a low-level SVN protocol driver that allows them to directly work with a repository.

A default implementation of the ISVNRepositoryPool interface - DefaultSVNRepositoryPool class - may cache the created SVNRepository objects in a common pool. Several threads may share that pool, but each thread is able only to retrieve those objects, that belong to it (were created in that thread).

Version:
  1.0
Author:
  TMate Software Ltd.
See Also:
  `DefaultSVNRepositoryPool`

Method Summary
`SVNRepository` | `createRepository(SVNURL url, boolean mayReuse)` Creates a low-level SVN protocol driver to access a repository.
`void` | `shutdownConnections(boolean shutdownAll)` Forces cached SVNRepository driver objects to close their socket connections.

Method Detail

### createRepository

    public SVNRepository createRepository(SVNURL url,
                                          boolean mayReuse)
                                   throws SVNException

  Creates a low-level SVN protocol driver to access a repository.

  If `mayReuse` is true and the pool feature for caching SVNRepository objects is supported by the concrete implementation of this interface, then this method first tries to find an existing SVNRepository object in the pool of the current thread. If such an object is found that was created for the same protocol as `url` has, then resets this object to a new `url` and returns it back. Otherwise creates a new one, stores it in the thread's pool and returns back.

  If `mayReuse` is false, then creates a new object, that won't be reusable.

  Parameters:
    `url` - a repository location to establish a connection with (will be the root directory for the working session)
    `mayReuse` - If true then retrieves/creates a reusable object, otherwise creates a new unreusable one
  Returns:
    a low-level API driver for direct interacting with a repository
  Throws:
    `SVNException` - if `url` is malformed or there's no appropriate implementation for a protocol
  See Also:
    `DefaultSVNRepositoryPool.createRepository(SVNURL, boolean)`

### shutdownConnections

    public void shutdownConnections(boolean shutdownAll)

  Forces cached SVNRepository driver objects to close their socket connections.

  A default implementation DefaultSVNRepositoryPool is able to cache SVNRepository objects in a common pool shared between multiple threads. This method allows to close connections of all the cached objects.

  Parameters:
    `shutdownAll` - if true - closes connections of all the SVNRepository objects, if false - connections of only some part of SVNRepository objects (for example, those, that are not needed anymore)
  See Also:
    `DefaultSVNRepositoryPool`

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

Copyright © 2004-2006 TMate Software Ltd. All Rights Reserved.