Class LockableModel
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.utils.jena.criticalsection.LockableModel
-
public class LockableModel extends Object
Makes it easy to use a Jena Model in a try-with-resources block. At the end of the block, the close() method will not close the model, but will merely release the lock. Wraps around a bare Model. Cannot be used without locking.try (LockedModel m = new LockableModel(model).read()) { ... }
-
-
Constructor Summary
Constructors Constructor Description LockableModel(org.apache.jena.rdf.model.Model model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LockedModelread()LockedModelwrite()
-
-
-
Method Detail
-
read
public LockedModel read()
-
write
public LockedModel write()
-
-