Java Doc for Lock.java in  » 6.0-JDK-Modules » jsr-283 » javax » jcr » lock » 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 » 6.0 JDK Modules » jsr 283 » javax.jcr.lock 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.jcr.lock.Lock

Lock
public interface Lock (Code)
Represents a lock placed on an item.




Method Summary
public  StringgetLockOwner()
     Returns the user ID of the user who owns this lock.
public  StringgetLockToken()
     May return the lock token for this lock.
public  NodegetNode()
     Returns the lock holding node.
public  booleanisDeep()
     Returns true if this is a deep lock; false otherwise.
public  booleanisLive()
     Returns true if this Lock object represents a lock that is currently in effect. If this lock has been unlocked either explicitly or due to an implementation-specific limitation (like a timeout) then it returns false.
public  booleanisLockOwningSession()
     Returns true if the current session is the owner of this lock, either because it is session-scoped and bound to this session or open-scoped and this session currently holds the token for this lock.
public  booleanisSessionScoped()
     Returns true if this is a session-scoped lock and the scope is bound to the current session.
public  voidrefresh()
     If this lock's time-to-live is governed by a timer, this method resets that timer so that the lock does not timeout and expire.



Method Detail
getLockOwner
public String getLockOwner()(Code)
Returns the user ID of the user who owns this lock. This is the value of the jcr:lockOwner property of the lock-holding node. It is also the value returned by Session.getUserID at the time that the lock was placed. The lock owner's identity is only provided for informational purposes. It does not govern who can perform an unlock or make changes to the locked nodes; that depends entirely upon who the token holder is. a user ID.



getLockToken
public String getLockToken()(Code)
May return the lock token for this lock. If this lock is open-scoped and the current session holds the lock token for this lock, then this method will return that lock token. Otherwise this method will return null. a String.



getNode
public Node getNode()(Code)
Returns the lock holding node. Note that N.getLock().getNode() (where N is a locked node) will only return N if N is the lock holder. If N is in the subtree of the lock holder, H, then this call will return H. an Node.



isDeep
public boolean isDeep()(Code)
Returns true if this is a deep lock; false otherwise. a boolean



isLive
public boolean isLive() throws RepositoryException(Code)
Returns true if this Lock object represents a lock that is currently in effect. If this lock has been unlocked either explicitly or due to an implementation-specific limitation (like a timeout) then it returns false. Note that this method is intended for those cases where one is holding a Lock Java object and wants to find out whether the lock (the JCR-level entity that is attached to the lockable node) that this object originally represented still exists. For example, a timeout or explicit unlock will remove a lock from a node but the Lock Java object corresponding to that lock may still exist, and in that case its isLive method will return false. a boolean.
throws:
  RepositoryException - if an error occurs.



isLockOwningSession
public boolean isLockOwningSession()(Code)
Returns true if the current session is the owner of this lock, either because it is session-scoped and bound to this session or open-scoped and this session currently holds the token for this lock. Returns false otherwise. a boolean.
since:
   JCR 2.0



isSessionScoped
public boolean isSessionScoped()(Code)
Returns true if this is a session-scoped lock and the scope is bound to the current session. Returns false if this is an open-scoped lock or is session-scoped but the scope is bound to another session. a boolean.



refresh
public void refresh() throws LockException, RepositoryException(Code)
If this lock's time-to-live is governed by a timer, this method resets that timer so that the lock does not timeout and expire. If this lock's time-to-live is not governed by a timer, then this method has no effect.

A LockException is thrown if this Session does not hold the correct lock token for this lock.
throws:
  LockException - if this Session does not hold the correct lock token for this lock.
throws:
  RepositoryException - if another error occurs.




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