net.sourceforge.hatbox
Class Lock
java.lang.Object
net.sourceforge.hatbox.Lock
public class Lock
- extends java.lang.Object
Acquires a read or write lock on the rtree meta node.
The meta node is a special node that contains spatial
table metadata rather than index entries.
- Author:
- Peter Yuill
Constructor Summary |
Lock(java.sql.Connection con,
RTreeDml dml)
The write lock constructor. |
Lock(java.sql.Connection con,
RTreeDml dml,
java.sql.PreparedStatement selectStmt)
The read lock constructor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Lock
public Lock(java.sql.Connection con,
RTreeDml dml,
java.sql.PreparedStatement selectStmt)
- The read lock constructor. Assumes a constructed index is available.
Acquires a read lock on the Meta Node
- Parameters:
con
- The connection to use for acquiring the lockdml
- The database and index specific DML to usewrite
- Is the lock to be used for writing the index?
Lock
public Lock(java.sql.Connection con,
RTreeDml dml)
- The write lock constructor. Assumes a constructed index is available.
Acquires a write lock on the Meta Node
- Parameters:
con
- The connection to use for acquiring the lockdml
- The database and index specific DML to usewrite
- Is the lock to be used for writing the index?
getRootId
public long getRootId()
setRootId
public void setRootId(long rootId)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getResultSet
public java.sql.ResultSet getResultSet()
isWrite
public boolean isWrite()
close
public void close()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
isClosed
public boolean isClosed()
Copyright © 2010. All Rights Reserved.