Interface RepositoryCache.Key

All Known Implementing Classes:
Enclosing class:

public static interface RepositoryCache.Key

Abstract hash key for RepositoryCache entries.

A Key instance should be lightweight, and implement hashCode() and equals() such that two Key instances are equal if they represent the same Repository location.

Method Summary
 Repository open(boolean mustExist)
          Called by if it doesn't exist yet.

Method Detail


Repository open(boolean mustExist)
                throws IOException,
Called by if it doesn't exist yet.

If a repository does not exist yet in the cache, the cache will call this method to acquire a handle to it.

mustExist - true if the repository must exist in order to be opened; false if a new non-existent repository is permitted to be created (the caller is responsible for calling create).
the new repository instance.
IOException - the repository could not be read (likely its core.version property is not supported).
RepositoryNotFoundException - There is no repository at the given location, only thrown if mustExist is true.

Copyright © 2013. All Rights Reserved.