Java Doc for BasicLocker.java in  » JMX » je » com » sleepycat » je » txn » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » JMX » je » com.sleepycat.je.txn 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sleepycat.je.txn.Locker
      com.sleepycat.je.txn.BasicLocker

All known Subclasses:   com.sleepycat.je.txn.ThreadLocker,  com.sleepycat.je.txn.BuddyLocker,
BasicLocker
public class BasicLocker extends Locker (Code)
A concrete Locker that simply tracks locks and releases them when operationEnd is called.



Constructor Summary
public  BasicLocker(EnvironmentImpl env)
     Creates a BasicLocker.

Method Summary
 voidaddLock(Long nodeId, LockType type, LockGrantType grantStatus)
     Add a lock to set owned by this transaction.
protected  voidcheckState(boolean ignoreCalledByAbort)
    
public  LockStatscollectStats(LockStats stats)
    
public  booleancreatedNode(long nodeId)
     Always false for this txn.
protected  longgenerateId(TxnManager txnManager)
     BasicLockers always have a fixed id, because they are never used for recovery.
public  longgetAbortLsn(long nodeId)
    
public  longgetOwnerAbortLsn(long nodeId)
     Get the abort LSN for this node in the txn that owns the lock on this node.
public  TxngetTxnLocker()
     No transactional locker is available.
public  WriteLockInfogetWriteLockInfo(long nodeId)
    
public  LockergetWriteOwnerLocker(long nodeId)
     Get the txn that owns the lock on this node.
public  booleanisReadCommittedIsolation()
     Is never read-committed isolation.
public  booleanisSerializableIsolation()
     Is never serializable isolation.
public  booleanisTransactional()
     Is never transactional.
 LockResultlockInternal(long nodeId, LockType lockType, boolean noWait, DatabaseImpl database)
    
public  voidmarkDeleteAtTxnEnd(DatabaseImpl db, boolean deleteAtCommit)
    
 voidmoveWriteToReadLock(long nodeId, Lock lock)
     A lock is being demoted.
public  LockernewNonTxnLocker()
     Creates a new instance of this txn for the same environment.
public  voidoperationEnd()
     Release locks at the end of the transaction.
public  voidoperationEnd(boolean operationOK)
     Release locks at the end of the transaction.
public  voidregisterCursor(CursorImpl cursor)
     This txn doesn't store cursors.
public  voidreleaseNonTxnLocks()
     Releases all locks, since all locks held by this locker are non-transactional.
 voidremoveLock(long nodeId)
     Remove a lock from the set owned by this txn.
public  voidsetHandleLockOwner(boolean operationOK, Database dbHandle, boolean dbIsClosing)
     Transfer any MapLN locks to the db handle.
public  voidunRegisterCursor(CursorImpl cursor)
     This txn doesn't store cursors.


Constructor Detail
BasicLocker
public BasicLocker(EnvironmentImpl env) throws DatabaseException(Code)
Creates a BasicLocker.




Method Detail
addLock
void addLock(Long nodeId, LockType type, LockGrantType grantStatus) throws DatabaseException(Code)
Add a lock to set owned by this transaction.



checkState
protected void checkState(boolean ignoreCalledByAbort) throws DatabaseException(Code)



collectStats
public LockStats collectStats(LockStats stats) throws DatabaseException(Code)
stats



createdNode
public boolean createdNode(long nodeId) throws DatabaseException(Code)
Always false for this txn.



generateId
protected long generateId(TxnManager txnManager)(Code)
BasicLockers always have a fixed id, because they are never used for recovery.



getAbortLsn
public long getAbortLsn(long nodeId) throws DatabaseException(Code)
the abort LSN for this node.



getOwnerAbortLsn
public long getOwnerAbortLsn(long nodeId) throws DatabaseException(Code)
Get the abort LSN for this node in the txn that owns the lock on this node. Return null if there's no owning txn found.



getTxnLocker
public Txn getTxnLocker()(Code)
No transactional locker is available.



getWriteLockInfo
public WriteLockInfo getWriteLockInfo(long nodeId) throws DatabaseException(Code)
a dummy WriteLockInfo for this node.



getWriteOwnerLocker
public Locker getWriteOwnerLocker(long nodeId) throws DatabaseException(Code)
Get the txn that owns the lock on this node. Return null if there's no owning txn found.



isReadCommittedIsolation
public boolean isReadCommittedIsolation()(Code)
Is never read-committed isolation.



isSerializableIsolation
public boolean isSerializableIsolation()(Code)
Is never serializable isolation.



isTransactional
public boolean isTransactional()(Code)
Is never transactional.



lockInternal
LockResult lockInternal(long nodeId, LockType lockType, boolean noWait, DatabaseImpl database) throws DatabaseException(Code)

See Also:   Locker.lockInternal



markDeleteAtTxnEnd
public void markDeleteAtTxnEnd(DatabaseImpl db, boolean deleteAtCommit) throws DatabaseException(Code)



moveWriteToReadLock
void moveWriteToReadLock(long nodeId, Lock lock)(Code)
A lock is being demoted. Move it from the write collection into the read collection.



newNonTxnLocker
public Locker newNonTxnLocker() throws DatabaseException(Code)
Creates a new instance of this txn for the same environment. No transactional locks are held by this object, so no locks are retained.



operationEnd
public void operationEnd() throws DatabaseException(Code)
Release locks at the end of the transaction.



operationEnd
public void operationEnd(boolean operationOK) throws DatabaseException(Code)
Release locks at the end of the transaction.



registerCursor
public void registerCursor(CursorImpl cursor) throws DatabaseException(Code)
This txn doesn't store cursors.



releaseNonTxnLocks
public void releaseNonTxnLocks() throws DatabaseException(Code)
Releases all locks, since all locks held by this locker are non-transactional.



removeLock
void removeLock(long nodeId) throws DatabaseException(Code)
Remove a lock from the set owned by this txn.



setHandleLockOwner
public void setHandleLockOwner(boolean operationOK, Database dbHandle, boolean dbIsClosing) throws DatabaseException(Code)
Transfer any MapLN locks to the db handle.



unRegisterCursor
public void unRegisterCursor(CursorImpl cursor) throws DatabaseException(Code)
This txn doesn't store cursors.



Fields inherited from com.sleepycat.je.txn.Locker
protected boolean defaultNoWait(Code)(Java Doc)
protected Map deleteInfo(Code)(Java Doc)
protected EnvironmentImpl envImpl(Code)(Java Doc)
protected Map handleLockToHandleMap(Code)(Java Doc)
protected Map handleToHandleLockMap(Code)(Java Doc)
protected long id(Code)(Java Doc)
protected LockManager lockManager(Code)(Java Doc)
protected long lockTimeOutMillis(Code)(Java Doc)
protected boolean readUncommittedDefault(Code)(Java Doc)
protected Thread thread(Code)(Java Doc)

Methods inherited from com.sleepycat.je.txn.Locker
public void addDeleteInfo(BIN bin, Key deletedKey) throws DatabaseException(Code)(Java Doc)
abstract void addLock(Long nodeId, LockType type, LockGrantType grantStatus) throws DatabaseException(Code)(Java Doc)
public void addToHandleMaps(Long handleLockId, Database databaseHandle)(Code)(Java Doc)
abstract protected void checkState(boolean ignoreCalledByAbort) throws DatabaseException(Code)(Java Doc)
abstract public LockStats collectStats(LockStats stats) throws DatabaseException(Code)(Java Doc)
abstract public boolean createdNode(long nodeId) throws DatabaseException(Code)(Java Doc)
public void demoteLock(long nodeId) throws DatabaseException(Code)(Java Doc)
public void dumpLockTable() throws DatabaseException(Code)(Java Doc)
abstract protected long generateId(TxnManager txnManager)(Code)(Java Doc)
abstract public long getAbortLsn(long nodeId) throws DatabaseException(Code)(Java Doc)
public boolean getDefaultNoWait()(Code)(Java Doc)
public long getId()(Code)(Java Doc)
public synchronized long getLockTimeout()(Code)(Java Doc)
abstract public Txn getTxnLocker()(Code)(Java Doc)
long getTxnStartMillis()(Code)(Java Doc)
public long getTxnTimeOut()(Code)(Java Doc)
Lock getWaitingFor()(Code)(Java Doc)
abstract public WriteLockInfo getWriteLockInfo(long nodeId) throws DatabaseException(Code)(Java Doc)
public boolean isHandleLockTransferrable()(Code)(Java Doc)
abstract public boolean isReadCommittedIsolation()(Code)(Java Doc)
public boolean isReadUncommittedDefault()(Code)(Java Doc)
abstract public boolean isSerializableIsolation()(Code)(Java Doc)
public boolean isTimedOut() throws DatabaseException(Code)(Java Doc)
abstract public boolean isTransactional()(Code)(Java Doc)
public LockResult lock(long nodeId, LockType lockType, boolean noWait, DatabaseImpl database) throws LockNotGrantedException, DeadlockException, DatabaseException(Code)(Java Doc)
abstract LockResult lockInternal(long nodeId, LockType lockType, boolean noWait, DatabaseImpl database) throws DeadlockException, DatabaseException(Code)(Java Doc)
abstract public void markDeleteAtTxnEnd(DatabaseImpl db, boolean deleteAtCommit) throws DatabaseException(Code)(Java Doc)
abstract void moveWriteToReadLock(long nodeId, Lock lock)(Code)(Java Doc)
abstract public Locker newNonTxnLocker() throws DatabaseException(Code)(Java Doc)
public LockResult nonBlockingLock(long nodeId, LockType lockType, DatabaseImpl database) throws DatabaseException(Code)(Java Doc)
abstract public void operationEnd() throws DatabaseException(Code)(Java Doc)
abstract public void operationEnd(boolean operationOK) throws DatabaseException(Code)(Java Doc)
public void operationEnd(OperationStatus status) throws DatabaseException(Code)(Java Doc)
abstract public void registerCursor(CursorImpl cursor) throws DatabaseException(Code)(Java Doc)
public void releaseLock(long nodeId) throws DatabaseException(Code)(Java Doc)
abstract public void releaseNonTxnLocks() throws DatabaseException(Code)(Java Doc)
abstract void removeLock(long nodeId) throws DatabaseException(Code)(Java Doc)
abstract public void setHandleLockOwner(boolean operationOK, Database dbHandle, boolean dbIsClosing) throws DatabaseException(Code)(Java Doc)
public synchronized void setLockTimeout(long timeout)(Code)(Java Doc)
void setOnlyAbortable()(Code)(Java Doc)
public synchronized void setTxnTimeout(long timeout)(Code)(Java Doc)
void setWaitingFor(Lock lock)(Code)(Java Doc)
public boolean sharesLocksWith(Locker other)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void transferHandleLock(Database dbHandle, Locker destLocker, boolean demoteToRead) throws DatabaseException(Code)(Java Doc)
void transferHandleLockToHandle(Database dbHandle) throws DatabaseException(Code)(Java Doc)
abstract public void unRegisterCursor(CursorImpl cursor) throws DatabaseException(Code)(Java Doc)
void unregisterHandle(Database dbHandle)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.