/** * Constructs a UnionGraph over the specified baseTripleCollections. Write * and delete operations are forwarded to the first baseTripleCollections. * * @param baseTripleCollections the baseTripleCollections */ public UnionGraph(Graph... baseTripleCollections) { this.baseTripleCollections = baseTripleCollections; readLock = getPartialReadLock(0); writeLock = createWriteLock(); }
/** * Constructs a UnionGraph over the specified baseTripleCollections. Write * and delete operations are forwarded to the first baseTripleCollections. * * @param baseTripleCollections the baseTripleCollections */ public UnionGraph(Graph... baseTripleCollections) { this.baseTripleCollections = baseTripleCollections; readLock = getPartialReadLock(0); writeLock = createWriteLock(); }
private Lock createWriteLock() { Lock partialReadLock = getPartialReadLock(1); Lock baseWriteLock = (baseTripleCollections[0]).getLock().writeLock(); return new UnionLock(baseWriteLock, partialReadLock); }
private Lock createWriteLock() { Lock partialReadLock = getPartialReadLock(1); Lock baseWriteLock = (baseTripleCollections[0]).getLock().writeLock(); return new UnionLock(baseWriteLock, partialReadLock); }