final KeyPair userKp) throws Exception {
final Repository repo = getRepository(userKp.getKey());
return new ReentrantReadWriteEntityLock<ObjectList>(repo) {
@Override
public ObjectList transaction() throws Exception {
return repo.startsWith((startsWith != null) ?
// Only load objects that start with the given
// prefix, if one was provided.
startsWith : "");
}
}.read(false); // Shared read lock on repo, no wait