Java Doc for ChannelTestBase.java in  » Net » JGroups-2.4.1-sp3 » org » jgroups » tests » 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 » Net » JGroups 2.4.1 sp3 » org.jgroups.tests 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jgroups.tests.ChannelTestBase

All known Subclasses:   org.jgroups.blocks.RpcDispatcherAnycastMultipleCallsTest,  org.jgroups.tests.DistributedHashtableUnitTest,  org.jgroups.tests.MultiplexerViewTest,  org.jgroups.tests.MultiplexerTest,  org.jgroups.tests.FlushTest,  org.jgroups.tests.ConcurrentStartupTest,
ChannelTestBase
public class ChannelTestBase extends TestCase (Code)

author:
   Bela Ban
author:
   Vladimir Blagojevic
author:
   Brian Stansberry
version:
   $Revision$

Inner Class :protected class DefaultChannelTestFactory implements ChannelTestFactory
Inner Class :public class DefaultMuxChannelTestFactory implements ChannelTestFactory
Inner Class :public class NextAvailableMuxChannelTestFactory implements ChannelTestFactory
Inner Class :protected interface ChannelTestFactory
Inner Class :abstract protected class ChannelApplication implements Runnable,MemberRetrievable
Inner Class :abstract protected class PushChannelApplication extends ChannelApplication implements ExtendedReceiver
Inner Class :abstract protected class PushChannelApplicationWithSemaphore extends PushChannelApplication
Inner Class :protected interface MemberRetrievable

Field Summary
protected static  StringCHANNEL_CONFIG
    
protected static  StringDEFAULT_MUX_FACTORY_COUNT
    
protected static  StringMUX_CHANNEL_CONFIG
    
protected static  StringMUX_CHANNEL_CONFIG_STACK_NAME
    
final protected static  RandomRANDOM
    
protected  intactive_threads
    
protected  intcurrentChannelGeneratedName
    
final protected  Loglog
    
protected  JChannelFactorymuxFactory
    
protected  Stringthread_dump
    

Constructor Summary
public  ChannelTestBase()
    
public  ChannelTestBase(String name)
    

Method Summary
public static  voidacquireSemaphore(Semaphore semaphore, long timeout, int count)
    
public static  booleanareViewsComplete(MemberRetrievable[] channels, int memberCount)
     Checks each channel in the parameter array to see if it has the exact same view as other channels in an array.
public static  voidblockUntilViewsReceived(MemberRetrievable[] channels, long timeout)
     Loops, continually calling ChannelTestBase.areViewsComplete(MemberRetrievable[]) until it either returns true or timeout ms have elapsed.
public static  voidblockUntilViewsReceived(Collection channels, long timeout)
    
public static  voidblockUntilViewsReceived(MemberRetrievable[] channels, int count, long timeout)
     Loops, continually calling ChannelTestBase.areViewsComplete(MemberRetrievable[]) until it either returns true or timeout ms have elapsed.
public static  voidblockUntilViewsReceived(Collection channels, int count, long timeout)
    
protected  String[]createApplicationNames(int applicationCount)
    
protected  ChannelcreateChannel(Object id)
    
protected  ChannelcreateChannel()
    
protected  String[]createMuxApplicationNames(int muxApplicationstPerChannelCount)
    
protected  String[]createMuxApplicationNames(int muxApplicationstPerChannelCount, int muxFactoryCount)
    
protected  intgetMuxFactoryCount()
     Returns value of mux.factorycount system property has been set, otherwise returns DEFAULT_MUX_FACTORY_COUNT.
protected  StringgetNextChannelName()
     Returns channel name as String next in alphabetic sequence since getNextChannelName() has been called last.
protected  booleanisMuxChannelUsed()
     Returns true if JVM has been started with mux.on system property set to true, false otherwise.
public static  booleanisViewComplete(MemberRetrievable channel, int memberCount)
    
protected  voidsetUp()
    
protected  booleanshouldCompareThreadCount()
     Returns true if JVM has been started with threadcount system property set to true, false otherwise.
public static  voidsleepRandom(int maxTime)
    
public static  voidsleepThread(long sleeptime)
     Puts the current thread to sleep for the desired number of ms, suppressing any exceptions.
public static  voidtakeAllPermits(Semaphore semaphore, int count)
    
protected  voidtearDown()
    
protected  booleanuseBlocking()
     Returns true if JVM has been started with useBlocking system property set to true, false otherwise.

Field Detail
CHANNEL_CONFIG
protected static String CHANNEL_CONFIG(Code)



DEFAULT_MUX_FACTORY_COUNT
protected static String DEFAULT_MUX_FACTORY_COUNT(Code)



MUX_CHANNEL_CONFIG
protected static String MUX_CHANNEL_CONFIG(Code)



MUX_CHANNEL_CONFIG_STACK_NAME
protected static String MUX_CHANNEL_CONFIG_STACK_NAME(Code)



RANDOM
final protected static Random RANDOM(Code)



active_threads
protected int active_threads(Code)



currentChannelGeneratedName
protected int currentChannelGeneratedName(Code)



log
final protected Log log(Code)



muxFactory
protected JChannelFactory muxFactory(Code)



thread_dump
protected String thread_dump(Code)




Constructor Detail
ChannelTestBase
public ChannelTestBase()(Code)



ChannelTestBase
public ChannelTestBase(String name)(Code)




Method Detail
acquireSemaphore
public static void acquireSemaphore(Semaphore semaphore, long timeout, int count) throws Exception(Code)



areViewsComplete
public static boolean areViewsComplete(MemberRetrievable[] channels, int memberCount)(Code)
Checks each channel in the parameter array to see if it has the exact same view as other channels in an array.



blockUntilViewsReceived
public static void blockUntilViewsReceived(MemberRetrievable[] channels, long timeout)(Code)
Loops, continually calling ChannelTestBase.areViewsComplete(MemberRetrievable[]) until it either returns true or timeout ms have elapsed.
Parameters:
  channels - channels which must all have consistent views
Parameters:
  timeout - max number of ms to loop
throws:
  RuntimeException - if timeout ms have elapse withoutall channels having the same number of members.



blockUntilViewsReceived
public static void blockUntilViewsReceived(Collection channels, long timeout)(Code)



blockUntilViewsReceived
public static void blockUntilViewsReceived(MemberRetrievable[] channels, int count, long timeout)(Code)
Loops, continually calling ChannelTestBase.areViewsComplete(MemberRetrievable[]) until it either returns true or timeout ms have elapsed.
Parameters:
  channels - channels which must all have consistent views
Parameters:
  timeout - max number of ms to loop
throws:
  RuntimeException - if timeout ms have elapse withoutall channels having the same number of members.



blockUntilViewsReceived
public static void blockUntilViewsReceived(Collection channels, int count, long timeout)(Code)



createApplicationNames
protected String[] createApplicationNames(int applicationCount)(Code)



createChannel
protected Channel createChannel(Object id) throws Exception(Code)



createChannel
protected Channel createChannel() throws Exception(Code)



createMuxApplicationNames
protected String[] createMuxApplicationNames(int muxApplicationstPerChannelCount)(Code)
Returns an array of mux application/service names with a guarantee that:

- there are no application/service name collissions on top of one channel (i.e cannot have two application/service(s) with the same name on top of one channel)

- each generated application/service name is guaranteed to have a corresponding pair application/service with the same name on another channel
Parameters:
  muxApplicationstPerChannelCount -




createMuxApplicationNames
protected String[] createMuxApplicationNames(int muxApplicationstPerChannelCount, int muxFactoryCount)(Code)
Returns an array of mux application/service names with a guarantee that:

- there are no application/service name collissions on top of one channel (i.e cannot have two application/service(s) with the same name on top of one channel)

- each generated application/service name is guaranteed to have a corresponding pair application/service with the same name on another channel
Parameters:
  muxApplicationstPerChannelCount -
Parameters:
  muxFactoryCount - how many mux factories should be used (has to be less than getMuxFactoryCount()) array of mux application id's represented as String objects




getMuxFactoryCount
protected int getMuxFactoryCount()(Code)
Returns value of mux.factorycount system property has been set, otherwise returns DEFAULT_MUX_FACTORY_COUNT.



getNextChannelName
protected String getNextChannelName()(Code)
Returns channel name as String next in alphabetic sequence since getNextChannelName() has been called last. Sequence is restarted to letter "A" after each setUp call.



isMuxChannelUsed
protected boolean isMuxChannelUsed()(Code)
Returns true if JVM has been started with mux.on system property set to true, false otherwise.



isViewComplete
public static boolean isViewComplete(MemberRetrievable channel, int memberCount)(Code)



setUp
protected void setUp() throws Exception(Code)



shouldCompareThreadCount
protected boolean shouldCompareThreadCount()(Code)
Returns true if JVM has been started with threadcount system property set to true, false otherwise.



sleepRandom
public static void sleepRandom(int maxTime)(Code)



sleepThread
public static void sleepThread(long sleeptime)(Code)
Puts the current thread to sleep for the desired number of ms, suppressing any exceptions.
Parameters:
  sleeptime - number of ms to sleep



takeAllPermits
public static void takeAllPermits(Semaphore semaphore, int count)(Code)



tearDown
protected void tearDown() throws Exception(Code)



useBlocking
protected boolean useBlocking()(Code)
Returns true if JVM has been started with useBlocking system property set to true, false otherwise.



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