org.apache.clerezza.rdf.core.impl
Class WriteBlockedMGraph

java.lang.Object
  extended by java.util.AbstractCollection<Triple>
      extended by org.apache.clerezza.rdf.core.impl.WriteBlockedTripleCollection
          extended by org.apache.clerezza.rdf.core.impl.WriteBlockedMGraph
All Implemented Interfaces:
Iterable<Triple>, Collection<Triple>, LockableMGraph, MGraph, TripleCollection

public class WriteBlockedMGraph
extends WriteBlockedTripleCollection
implements LockableMGraph

This is a wrapper object for MGraph. If SecurityManger is not null TcManager checks the TcPermission. If read-only permissions are set this wrapper is used instead of MGraph.

Author:
tsuy

Constructor Summary
WriteBlockedMGraph(LockableMGraph mGraph)
          Creates a wrapper of SimpleMGraph
 
Method Summary
 Graph getGraph()
          Returns the graph
 ReadWriteLock getLock()
          The lock provided by this methods allows to create read- and write-locks that span individual method calls.
 
Methods inherited from class org.apache.clerezza.rdf.core.impl.WriteBlockedTripleCollection
add, addAll, addGraphListener, addGraphListener, clear, filter, iterator, remove, removeAll, removeGraphListener, retainAll, size
 
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.clerezza.rdf.core.MGraph
equals
 
Methods inherited from interface org.apache.clerezza.rdf.core.TripleCollection
addGraphListener, addGraphListener, filter, removeGraphListener
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

WriteBlockedMGraph

public WriteBlockedMGraph(LockableMGraph mGraph)
Creates a wrapper of SimpleMGraph

Method Detail

getGraph

public Graph getGraph()
Description copied from interface: MGraph
Returns the graph

Specified by:
getGraph in interface MGraph
Returns:
graph

getLock

public ReadWriteLock getLock()
Description copied from interface: LockableMGraph
The lock provided by this methods allows to create read- and write-locks that span individual method calls. Having a read locks prevents other threads from writing to this MGraph, having a write-lock prevents other threads from reading and writing.

Specified by:
getLock in interface LockableMGraph
Returns:
the lock of this MGraph


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.