- Timestamp:
- 04/03/12 22:05:48 (10 years ago)
- Location:
- Tests/JAVA/test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Tests/JAVA/test/config.properties.template
r523 r534 22 22 disruptor.wait-strategy = com.lmax.disruptor.BusySpinWaitStrategy 23 23 disruptor.publish-in-batch = false 24 disruptor.subscribe-in-batch = true -
Tests/JAVA/test/src/main/java/test/threads/queue/unstressed/DisruptorTask.java
r533 r534 22 22 private final WaitStrategy waitStrategy; 23 23 private final boolean publishInBatch; 24 private final boolean subs ribeInBatch;24 private final boolean subscribeInBatch; 25 25 26 26 public DisruptorTask( final Config config ) throws ClassNotFoundException, InstantiationException, IllegalAccessException { … … 33 33 34 34 this.publishInBatch = config.getAsBoolean( "disruptor.publish-in-batch", false ); 35 this.subs ribeInBatch = config.getAsBoolean( "disruptor.subscribe-in-batch", true );35 this.subscribeInBatch = config.getAsBoolean( "disruptor.subscribe-in-batch", true ); 36 36 } 37 37 … … 68 68 69 69 long sum = 0; 70 if ( subs ribeInBatch ) {70 if ( subscribeInBatch ) { 71 71 long nextSequence = lastSequence.get() + 1L; 72 72 while ( nextSequence <= maxSequence ) { … … 112 112 public String toString() { 113 113 return String.format( 114 "%s[%d][%s][ %s]",114 "%s[%d][%s][publish:%s][subscribe:%s]", 115 115 getClass().getSimpleName(), 116 116 bufferSize(), 117 117 waitStrategy.getClass().getSimpleName(), 118 ( publishInBatch ) ? ( "batching" ) : ( "no-batching" ) 118 ( publishInBatch ) ? ( "batch" ) : ( "no-batch" ), 119 ( subscribeInBatch ) ? ( "batch" ) : ( "no-batch" ) 119 120 ); 120 121 }
Note: See TracChangeset
for help on using the changeset viewer.