Java Doc for T_LockFactory.java in  » Database-DBMS » db-derby-10.2 » org » apache » derbyTesting » unitTests » services » 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 » Database DBMS » db derby 10.2 » org.apache.derbyTesting.unitTests.services 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.derbyTesting.unitTests.harness.T_MultiIterations
   org.apache.derbyTesting.unitTests.services.T_LockFactory

T_LockFactory
public class T_LockFactory extends T_MultiIterations (Code)
Protocol unit test for the LockManager.
See Also:   LockFactory
See Also:    org.apache.derbyTesting.unitTests.harness..UnitTest


Field Summary
final protected static  intITERATIONS
    
protected  LockFactorylf
    

Constructor Summary
public  T_LockFactory()
    

Method Summary
 voidM001()
     Multi-user test 001. Create two lockable objects and pass them off to two threads. Each thread will run lock the first object, set its value then lock the second object & set its value, yield and then release the lock on one and then on two.
 voidM002()
     Multi-user test 002 Create a single lockable and have three threads lock it, yield and then release it.
 voidM003()
     Multi-user test 003 Create a single lockable and have three threads lock it, yield and then release it.
 voidM004()
     Multi-user test 004 As M003 but each thread will lock the object twice, to ensure that lock manager grantes the lock when the compatability space and qualifier match.
 voidS001()
     Single user API test 001.
 voidS002()
     Single user API test 002.
 voidS003()
     Single user API test 003.
 voidS004()
     Single user API test 004.
 voidS005()
     Single user API test 005.
 voidS007()
     Single user API test 007.
 voidS008()
     Single user API test 008.
 voidcheckLockCount(Object cs, int expected)
     Check to see if the total number of locks we have is as expected.
 voidcheckLockGroupCount(Object cs, Object group, int expected)
     Check to see if the number of locks in a group we have is as expected.
protected  StringgetModuleToTestProtocolName()
    
protected  voidrunTestSet()
     Run once per-iteration to run the actual test.
protected  voidsetupTest()
     Run all the tests, each test that starts with 'S' is a single user test, each test that starts with 'M' is a multi-user test.

Field Detail
ITERATIONS
final protected static int ITERATIONS(Code)



lf
protected LockFactory lf(Code)




Constructor Detail
T_LockFactory
public T_LockFactory()(Code)




Method Detail
M001
void M001() throws StandardException, T_Fail(Code)
Multi-user test 001. Create two lockable objects and pass them off to two threads. Each thread will run lock the first object, set its value then lock the second object & set its value, yield and then release the lock on one and then on two. Various checks are made to ensure the values are as expected.
exception:
  StandardException - An exception thrown by a method of LockFactory
exception:
  T_Fail - Some behaviour of the LockFactory is incorrect



M002
void M002() throws StandardException, T_Fail(Code)
Multi-user test 002 Create a single lockable and have three threads lock it, yield and then release it. The single lockable can only have one locker.
exception:
  StandardException - An exception thrown by a method of LockFactory
exception:
  T_Fail - Some behaviour of the LockFactory is incorrect



M003
void M003() throws StandardException, T_Fail(Code)
Multi-user test 003 Create a single lockable and have three threads lock it, yield and then release it. The single lockable is a semaphore that can have two lockers.
exception:
  StandardException - An exception thrown by a method of LockFactory
exception:
  T_Fail - Some behaviour of the LockFactory is incorrect



M004
void M004() throws StandardException, T_Fail(Code)
Multi-user test 004 As M003 but each thread will lock the object twice, to ensure that lock manager grantes the lock when the compatability space and qualifier match.
exception:
  StandardException - An exception thrown by a method of LockFactory
exception:
  T_Fail - Some behaviour of the LockFactory is incorrect



S001
void S001() throws StandardException, T_Fail(Code)
Single user API test 001. Lock an single object in a single group with all lock methods and then unlock the object with all unlock methods.
exception:
  StandardException - An exception thrown by a method of LockFactory
exception:
  T_Fail - Some behaviour of the LockFactory is incorrect



S002
void S002() throws StandardException, T_Fail(Code)
Single user API test 002. Lock an object in different groups and check unlocks apply to a single group.
exception:
  StandardException - An exception thrown by a method of LockFactory
exception:
  T_Fail - Some behaviour of the LockFactory is incorrect



S003
void S003() throws StandardException, T_Fail(Code)
Single user API test 003. Lock multiple objects in different groups and check unlocks apply to a single group.
exception:
  StandardException - An exception thrown by a method of LockFactory
exception:
  T_Fail - Some behaviour of the LockFactory is incorrect



S004
void S004() throws StandardException, T_Fail(Code)
Single user API test 004. Lock multiple objects in different groups and transfer locks between groups.
exception:
  StandardException - An exception thrown by a method of LockFactory
exception:
  T_Fail - Some behaviour of the LockFactory is incorrect



S005
void S005() throws StandardException, T_Fail(Code)
Single user API test 005. Create two compatability spaces and ensure that locks block each other out.
exception:
  StandardException - An exception thrown by a method of LockFactory
exception:
  T_Fail - Some behaviour of the LockFactory is incorrect



S007
void S007() throws StandardException, T_Fail(Code)
Single user API test 007. Tests on groups and compatibility spaces never seen by the lock manager.
exception:
  StandardException - An exception thrown by a method of LockFactory
exception:
  T_Fail - Some behaviour of the LockFactory is incorrect



S008
void S008() throws StandardException, T_Fail(Code)
Single user API test 008. Create two compatability spaces and ensure that locks/latches block each other out.
exception:
  StandardException - An exception thrown by a method of LockFactory
exception:
  T_Fail - Some behaviour of the LockFactory is incorrect



checkLockCount
void checkLockCount(Object cs, int expected) throws T_Fail(Code)
Check to see if the total number of locks we have is as expected.
exception:
  T_Fail - Number of locks is not as expected.



checkLockGroupCount
void checkLockGroupCount(Object cs, Object group, int expected) throws T_Fail(Code)
Check to see if the number of locks in a group we have is as expected.
exception:
  T_Fail - Number of locks is not as expected.



getModuleToTestProtocolName
protected String getModuleToTestProtocolName()(Code)



runTestSet
protected void runTestSet() throws T_Fail(Code)
Run once per-iteration to run the actual test.
exception:
  T_Fail - the test failed in some way.



setupTest
protected void setupTest() throws T_Fail(Code)
Run all the tests, each test that starts with 'S' is a single user test, each test that starts with 'M' is a multi-user test.
exception:
  T_Fail - The test failed in some way.



Methods inherited from org.apache.derbyTesting.unitTests.harness.T_MultiIterations
abstract protected void runTestSet() throws T_Fail(Code)(Java Doc)
protected void runTests() throws T_Fail(Code)(Java Doc)
abstract protected void setupTest() throws T_Fail(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.