Showing preview only (1,175K chars total). Download the full file or copy to clipboard to get everything.
Repository: LMAX-Exchange/disruptor
Branch: master
Commit: c871ca49826a
Files: 283
Total size: 1.1 MB
Directory structure:
gitextract_mzd229g4/
├── .editorconfig
├── .githooks/
│ └── pre-commit
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ └── workflows/
│ ├── asciidoc-build-only.yml
│ ├── asciidoc.yml
│ ├── codeql-analysis.yml
│ ├── gradle-build.yml
│ ├── gradle-wrapper-validation.yml
│ ├── jcstress-manual.yml
│ └── jcstress-quick.yml
├── .gitignore
├── .lgtm.yml
├── CHANGELOG.adoc
├── LICENCE.txt
├── README.adoc
├── build.gradle
├── config/
│ └── checkstyle/
│ ├── checkstyle.xml
│ └── suppress.xml
├── gradle/
│ ├── asciidoc.gradle
│ ├── jcstress.gradle
│ ├── jmh.gradle
│ ├── maven.gradle
│ ├── perf.gradle
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── src/
├── docs/
│ └── asciidoc/
│ └── en/
│ ├── changelog.adoc
│ ├── developer-guide/
│ │ ├── 10_getting_and_building.adoc
│ │ ├── 20_performance_tests.adoc
│ │ ├── 25_jsctress_tests.adoc
│ │ ├── 30_publishing_release.adoc
│ │ ├── 90_tips.adoc
│ │ └── index.adoc
│ ├── disruptor.adoc
│ ├── index.adoc
│ └── user-guide/
│ ├── 10_using_the_disruptor.adoc
│ ├── 20_design_and_implementation.adoc
│ ├── 30_known_issues.adoc
│ ├── 40_batch_rewind_use_case.adoc
│ └── index.adoc
├── examples/
│ └── java/
│ └── com/
│ └── lmax/
│ └── disruptor/
│ └── examples/
│ ├── DynamicallyAddHandler.java
│ ├── EarlyReleaseHandler.java
│ ├── HandleExceptionOnTranslate.java
│ ├── KeyedBatching.java
│ ├── MultiProducerWithTranslator.java
│ ├── NamedEventHandler.java
│ ├── Pipeliner.java
│ ├── PullWithBatchedPoller.java
│ ├── PullWithPoller.java
│ ├── SequentialThreeConsumers.java
│ ├── ShutdownOnError.java
│ ├── ThreeToOneDisruptor.java
│ ├── WaitForProcessing.java
│ ├── WaitForShutdown.java
│ ├── longevent/
│ │ ├── LongEvent.java
│ │ ├── LongEventFactory.java
│ │ ├── LongEventHandler.java
│ │ ├── LongEventProducer.java
│ │ ├── LongEventProducerWithTranslator.java
│ │ ├── lambdas/
│ │ │ └── LongEventMain.java
│ │ ├── legacy/
│ │ │ ├── LongEventMain.java
│ │ │ └── LongEventProducer.java
│ │ └── methodrefs/
│ │ └── LongEventMain.java
│ ├── objectevent/
│ │ ├── ClearingEventHandler.java
│ │ ├── Main.java
│ │ ├── ObjectEvent.java
│ │ └── ProcessingEventHandler.java
│ └── support/
│ ├── LongEvent.java
│ └── StubEvent.java
├── jcstress/
│ └── java/
│ └── com/
│ └── lmax/
│ └── disruptor/
│ ├── LoggerInitializationStress.java
│ ├── MultiProducerSequencerUnsafeStress.java
│ ├── MultiProducerSequencerVarHandleStress.java
│ ├── SequenceStressUnsafe.java
│ ├── SequenceStressVarHandle.java
│ └── SequenceStressVarHandleBarrier.java
├── jmh/
│ └── java/
│ └── com/
│ └── lmax/
│ └── disruptor/
│ ├── ArrayAccessBenchmark.java
│ ├── BlockingQueueBenchmark.java
│ ├── MultiProducerSequencerBenchmark.java
│ ├── MultiProducerSingleConsumer.java
│ ├── RingBufferBenchmark.java
│ ├── RingBufferFalseSharingBenchmark.java
│ ├── SequenceBenchmark.java
│ ├── SingleProducerSingleConsumer.java
│ └── util/
│ ├── Constants.java
│ ├── SimpleEvent.java
│ └── SimpleEventHandler.java
├── main/
│ └── java/
│ ├── com/
│ │ └── lmax/
│ │ └── disruptor/
│ │ ├── AbstractSequencer.java
│ │ ├── AggregateEventHandler.java
│ │ ├── AlertException.java
│ │ ├── BatchEventProcessor.java
│ │ ├── BatchEventProcessorBuilder.java
│ │ ├── BatchRewindStrategy.java
│ │ ├── BlockingWaitStrategy.java
│ │ ├── BusySpinWaitStrategy.java
│ │ ├── Cursored.java
│ │ ├── DataProvider.java
│ │ ├── EventFactory.java
│ │ ├── EventHandler.java
│ │ ├── EventHandlerBase.java
│ │ ├── EventHandlerIdentity.java
│ │ ├── EventPoller.java
│ │ ├── EventProcessor.java
│ │ ├── EventSequencer.java
│ │ ├── EventSink.java
│ │ ├── EventTranslator.java
│ │ ├── EventTranslatorOneArg.java
│ │ ├── EventTranslatorThreeArg.java
│ │ ├── EventTranslatorTwoArg.java
│ │ ├── EventTranslatorVararg.java
│ │ ├── EventuallyGiveUpBatchRewindStrategy.java
│ │ ├── ExceptionHandler.java
│ │ ├── ExceptionHandlers.java
│ │ ├── FatalExceptionHandler.java
│ │ ├── FixedSequenceGroup.java
│ │ ├── IgnoreExceptionHandler.java
│ │ ├── InsufficientCapacityException.java
│ │ ├── LiteBlockingWaitStrategy.java
│ │ ├── LiteTimeoutBlockingWaitStrategy.java
│ │ ├── MultiProducerSequencer.java
│ │ ├── NanosecondPauseBatchRewindStrategy.java
│ │ ├── NoOpEventProcessor.java
│ │ ├── PhasedBackoffWaitStrategy.java
│ │ ├── ProcessingSequenceBarrier.java
│ │ ├── RewindAction.java
│ │ ├── RewindHandler.java
│ │ ├── RewindableEventHandler.java
│ │ ├── RewindableException.java
│ │ ├── RingBuffer.java
│ │ ├── Sequence.java
│ │ ├── SequenceBarrier.java
│ │ ├── SequenceGroup.java
│ │ ├── SequenceGroups.java
│ │ ├── Sequenced.java
│ │ ├── Sequencer.java
│ │ ├── SimpleBatchRewindStrategy.java
│ │ ├── SingleProducerSequencer.java
│ │ ├── SleepingWaitStrategy.java
│ │ ├── TimeoutBlockingWaitStrategy.java
│ │ ├── TimeoutException.java
│ │ ├── WaitStrategy.java
│ │ ├── YieldingWaitStrategy.java
│ │ ├── dsl/
│ │ │ ├── ConsumerInfo.java
│ │ │ ├── ConsumerRepository.java
│ │ │ ├── Disruptor.java
│ │ │ ├── EventHandlerGroup.java
│ │ │ ├── EventProcessorFactory.java
│ │ │ ├── EventProcessorInfo.java
│ │ │ ├── ExceptionHandlerSetting.java
│ │ │ ├── ExceptionHandlerWrapper.java
│ │ │ ├── ProducerType.java
│ │ │ └── package-info.java
│ │ ├── package-info.java
│ │ └── util/
│ │ ├── DaemonThreadFactory.java
│ │ ├── ThreadHints.java
│ │ ├── Util.java
│ │ └── package-info.java
│ └── module-info.java
├── perftest/
│ └── java/
│ └── com/
│ └── lmax/
│ └── disruptor/
│ ├── AbstractPerfTestDisruptor.java
│ ├── AbstractPerfTestQueue.java
│ ├── PerfTestContext.java
│ ├── immutable/
│ │ ├── Constants.java
│ │ ├── CustomPerformanceTest.java
│ │ ├── CustomRingBuffer.java
│ │ ├── EventAccessor.java
│ │ ├── EventHolder.java
│ │ ├── EventHolderHandler.java
│ │ ├── SimpleEvent.java
│ │ ├── SimpleEventHandler.java
│ │ └── SimplePerformanceTest.java
│ ├── offheap/
│ │ ├── OneToOneOffHeapThroughputTest.java
│ │ └── OneToOneOnHeapThroughputTest.java
│ ├── queue/
│ │ ├── OneToOneQueueBatchedThroughputTest.java
│ │ ├── OneToOneQueueThroughputTest.java
│ │ ├── OneToThreeDiamondQueueThroughputTest.java
│ │ ├── OneToThreePipelineQueueThroughputTest.java
│ │ ├── OneToThreeQueueThroughputTest.java
│ │ ├── PingPongQueueLatencyTest.java
│ │ ├── ThreeToOneQueueBatchThroughputTest.java
│ │ └── ThreeToOneQueueThroughputTest.java
│ ├── raw/
│ │ ├── OneToOneRawBatchThroughputTest.java
│ │ └── OneToOneRawThroughputTest.java
│ ├── sequenced/
│ │ ├── OneToOneSequencedBatchThroughputTest.java
│ │ ├── OneToOneSequencedLongArrayThroughputTest.java
│ │ ├── OneToOneSequencedPollerThroughputTest.java
│ │ ├── OneToOneSequencedThroughputTest.java
│ │ ├── OneToThreeDiamondSequencedThroughputTest.java
│ │ ├── OneToThreePipelineSequencedThroughputTest.java
│ │ ├── OneToThreeSequencedThroughputTest.java
│ │ ├── PingPongSequencedLatencyTest.java
│ │ ├── ThreeToOneSequencedBatchThroughputTest.java
│ │ ├── ThreeToOneSequencedThroughputTest.java
│ │ └── ThreeToThreeSequencedThroughputTest.java
│ ├── support/
│ │ ├── EventCountingQueueProcessor.java
│ │ ├── FizzBuzzEvent.java
│ │ ├── FizzBuzzEventHandler.java
│ │ ├── FizzBuzzQueueProcessor.java
│ │ ├── FizzBuzzStep.java
│ │ ├── FunctionEvent.java
│ │ ├── FunctionEventHandler.java
│ │ ├── FunctionQueueProcessor.java
│ │ ├── FunctionStep.java
│ │ ├── LongArrayEventHandler.java
│ │ ├── LongArrayPublisher.java
│ │ ├── MultiBufferBatchEventProcessor.java
│ │ ├── Operation.java
│ │ ├── PerfTestUtil.java
│ │ ├── ValueAdditionBatchQueueProcessor.java
│ │ ├── ValueAdditionEventHandler.java
│ │ ├── ValueAdditionQueueBatchProcessor.java
│ │ ├── ValueAdditionQueueProcessor.java
│ │ ├── ValueBatchPublisher.java
│ │ ├── ValueEvent.java
│ │ ├── ValueMutationEventHandler.java
│ │ ├── ValueMutationQueueProcessor.java
│ │ ├── ValuePublisher.java
│ │ └── ValueQueuePublisher.java
│ └── translator/
│ └── OneToOneTranslatorThroughputTest.java
└── test/
└── java/
└── com/
└── lmax/
└── disruptor/
├── AggregateEventHandlerTest.java
├── BatchEventProcessorTest.java
├── BatchingTest.java
├── BusySpinWaitStrategyTest.java
├── DisruptorStressTest.java
├── EventPollerTest.java
├── EventPublisherTest.java
├── EventTranslatorTest.java
├── FatalExceptionHandlerTest.java
├── FixedSequenceGroupTest.java
├── IgnoreExceptionHandlerTest.java
├── LifecycleAwareTest.java
├── LiteTimeoutBlockingWaitStrategyTest.java
├── MaxBatchSizeEventProcessorTest.java
├── MultiProducerSequencerTest.java
├── PhasedBackoffWaitStrategyTest.java
├── RewindBatchEventProcessorTest.java
├── RingBufferEventMatcher.java
├── RingBufferTest.java
├── RingBufferWithAssertingStubTest.java
├── SequenceBarrierTest.java
├── SequenceGroupTest.java
├── SequenceReportingCallbackTest.java
├── SequenceTest.java
├── SequencerTest.java
├── ShutdownOnFatalExceptionTest.java
├── SingleProducerSequencerTest.java
├── SleepingWaitStrategyTest.java
├── TimeoutBlockingWaitStrategyTest.java
├── YieldingWaitStrategyTest.java
├── alternatives/
│ ├── MultiProducerSequencerUnsafe.java
│ ├── MultiProducerSequencerVarHandle.java
│ ├── RingBufferArray.java
│ ├── RingBufferUnsafe.java
│ ├── SequenceDoublePadded.java
│ ├── SequenceUnsafe.java
│ ├── SequenceVarHandle.java
│ ├── SequenceVarHandleArray.java
│ └── SequenceVarHandleBarrier.java
├── dsl/
│ ├── ConsumerRepositoryTest.java
│ ├── DisruptorTest.java
│ └── stubs/
│ ├── DelayedEventHandler.java
│ ├── EventHandlerStub.java
│ ├── EvilEqualsEventHandler.java
│ ├── ExceptionThrowingEventHandler.java
│ ├── SleepingEventHandler.java
│ ├── StubExceptionHandler.java
│ ├── StubPublisher.java
│ └── StubThreadFactory.java
├── support/
│ ├── DummyEventHandler.java
│ ├── DummyEventProcessor.java
│ ├── DummySequenceBarrier.java
│ ├── DummyWaitStrategy.java
│ ├── LongEvent.java
│ ├── SequenceUpdater.java
│ ├── StubEvent.java
│ ├── TestEvent.java
│ ├── TestWaiter.java
│ └── WaitStrategyTestUtil.java
└── util/
├── MutableLong.java
├── PaddedLong.java
├── UnsafeAccess.java
└── UtilTest.java
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
# noinspection EditorConfigKeyCorrectness
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = false
max_line_length = 120
tab_width = 4
trim_trailing_whitespace = true
curly_bracket_next_line=true
spaces_around_operators=true
indent_brace_style=Allman
ij_continuation_indent_size = 8
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on
ij_formatter_tags_enabled = false
ij_smart_tabs = false
ij_wrap_on_typing = false
[*.css]
ij_css_align_closing_brace_with_properties = false
ij_css_blank_lines_around_nested_selector = 1
ij_css_blank_lines_between_blocks = 1
ij_css_brace_placement = end_of_line
ij_css_enforce_quotes_on_format = false
ij_css_hex_color_long_format = false
ij_css_hex_color_lower_case = false
ij_css_hex_color_short_format = false
ij_css_hex_color_upper_case = false
ij_css_keep_blank_lines_in_code = 2
ij_css_keep_indents_on_empty_lines = false
ij_css_keep_single_line_blocks = false
ij_css_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
ij_css_space_after_colon = true
ij_css_space_before_opening_brace = true
ij_css_use_double_quotes = true
ij_css_value_alignment = do_not_align
[*.java]
ij_java_align_consecutive_assignments = false
ij_java_align_consecutive_variable_declarations = false
ij_java_align_group_field_declarations = false
ij_java_align_multiline_annotation_parameters = false
ij_java_align_multiline_array_initializer_expression = false
ij_java_align_multiline_assignment = false
ij_java_align_multiline_binary_operation = false
ij_java_align_multiline_chained_methods = false
ij_java_align_multiline_extends_list = false
ij_java_align_multiline_for = true
ij_java_align_multiline_method_parentheses = false
ij_java_align_multiline_parameters = true
ij_java_align_multiline_parameters_in_calls = false
ij_java_align_multiline_parenthesized_expression = false
ij_java_align_multiline_records = true
ij_java_align_multiline_resources = true
ij_java_align_multiline_ternary_operation = false
ij_java_align_multiline_text_blocks = false
ij_java_align_multiline_throws_list = false
ij_java_align_subsequent_simple_methods = false
ij_java_align_throws_keyword = false
ij_java_annotation_parameter_wrap = off
ij_java_array_initializer_new_line_after_left_brace = false
ij_java_array_initializer_right_brace_on_new_line = false
ij_java_array_initializer_wrap = off
ij_java_assert_statement_colon_on_next_line = false
ij_java_assert_statement_wrap = off
ij_java_assignment_wrap = off
ij_java_binary_operation_sign_on_next_line = false
ij_java_binary_operation_wrap = off
ij_java_blank_lines_after_anonymous_class_header = 0
ij_java_blank_lines_after_class_header = 0
ij_java_blank_lines_after_imports = 1
ij_java_blank_lines_after_package = 1
ij_java_blank_lines_around_class = 1
ij_java_blank_lines_around_field = 0
ij_java_blank_lines_around_field_in_interface = 0
ij_java_blank_lines_around_initializer = 1
ij_java_blank_lines_around_method = 1
ij_java_blank_lines_around_method_in_interface = 1
ij_java_blank_lines_before_class_end = 0
ij_java_blank_lines_before_imports = 1
ij_java_blank_lines_before_method_body = 0
ij_java_blank_lines_before_package = 0
ij_java_block_brace_style = next_line
ij_java_block_comment_at_first_column = true
ij_java_call_parameters_new_line_after_left_paren = false
ij_java_call_parameters_right_paren_on_new_line = false
ij_java_call_parameters_wrap = off
ij_java_case_statement_on_separate_line = true
ij_java_catch_on_new_line = true
ij_java_class_annotation_wrap = split_into_lines
ij_java_class_brace_style = next_line
ij_java_class_count_to_use_import_on_demand = 99
ij_java_class_names_in_javadoc = 1
ij_java_do_not_indent_top_level_class_members = false
ij_java_do_not_wrap_after_single_annotation = false
ij_java_do_while_brace_force = always
ij_java_doc_add_blank_line_after_description = true
ij_java_doc_add_blank_line_after_param_comments = false
ij_java_doc_add_blank_line_after_return = false
ij_java_doc_add_p_tag_on_empty_lines = true
ij_java_doc_align_exception_comments = true
ij_java_doc_align_param_comments = true
ij_java_doc_do_not_wrap_if_one_line = false
ij_java_doc_enable_formatting = true
ij_java_doc_enable_leading_asterisks = true
ij_java_doc_indent_on_continuation = false
ij_java_doc_keep_empty_lines = true
ij_java_doc_keep_empty_parameter_tag = true
ij_java_doc_keep_empty_return_tag = true
ij_java_doc_keep_empty_throws_tag = true
ij_java_doc_keep_invalid_tags = true
ij_java_doc_param_description_on_new_line = false
ij_java_doc_preserve_line_breaks = false
ij_java_doc_use_throws_not_exception_tag = true
ij_java_else_on_new_line = true
ij_java_entity_dd_suffix = EJB
ij_java_entity_eb_suffix = Bean
ij_java_entity_hi_suffix = Home
ij_java_entity_lhi_prefix = Local
ij_java_entity_lhi_suffix = Home
ij_java_entity_li_prefix = Local
ij_java_entity_pk_class = java.lang.String
ij_java_entity_vo_suffix = VO
ij_java_enum_constants_wrap = off
ij_java_extends_keyword_wrap = off
ij_java_extends_list_wrap = off
ij_java_field_annotation_wrap = split_into_lines
ij_java_finally_on_new_line = true
ij_java_for_brace_force = always
ij_java_for_statement_new_line_after_left_paren = false
ij_java_for_statement_right_paren_on_new_line = false
ij_java_for_statement_wrap = off
ij_java_generate_final_locals = true
ij_java_generate_final_parameters = true
ij_java_if_brace_force = always
ij_java_imports_layout = *,|,javax.**,java.**,|,$*
ij_java_indent_case_from_switch = true
ij_java_insert_inner_class_imports = false
ij_java_insert_override_annotation = true
ij_java_keep_blank_lines_before_right_brace = 2
ij_java_keep_blank_lines_between_package_declaration_and_header = 2
ij_java_keep_blank_lines_in_code = 2
ij_java_keep_blank_lines_in_declarations = 2
ij_java_keep_control_statement_in_one_line = true
ij_java_keep_first_column_comment = true
ij_java_keep_indents_on_empty_lines = false
ij_java_keep_line_breaks = true
ij_java_keep_multiple_expressions_in_one_line = false
ij_java_keep_simple_blocks_in_one_line = false
ij_java_keep_simple_classes_in_one_line = false
ij_java_keep_simple_lambdas_in_one_line = false
ij_java_keep_simple_methods_in_one_line = false
ij_java_label_indent_absolute = false
ij_java_label_indent_size = 0
ij_java_lambda_brace_style = next_line
ij_java_layout_static_imports_separately = true
ij_java_line_comment_add_space = false
ij_java_line_comment_at_first_column = true
ij_java_message_dd_suffix = EJB
ij_java_message_eb_suffix = Bean
ij_java_method_annotation_wrap = split_into_lines
ij_java_method_brace_style = next_line
ij_java_method_call_chain_wrap = off
ij_java_method_parameters_new_line_after_left_paren = false
ij_java_method_parameters_right_paren_on_new_line = false
ij_java_method_parameters_wrap = off
ij_java_modifier_list_wrap = false
ij_java_names_count_to_use_import_on_demand = 99
ij_java_new_line_after_lparen_in_record_header = false
ij_java_packages_to_use_import_on_demand = java.awt.*,javax.swing.*
ij_java_parameter_annotation_wrap = off
ij_java_parentheses_expression_new_line_after_left_paren = false
ij_java_parentheses_expression_right_paren_on_new_line = false
ij_java_place_assignment_sign_on_next_line = false
ij_java_prefer_longer_names = true
ij_java_prefer_parameters_wrap = false
ij_java_record_components_wrap = normal
ij_java_repeat_synchronized = true
ij_java_replace_instanceof_and_cast = false
ij_java_replace_null_check = true
ij_java_replace_sum_lambda_with_method_ref = true
ij_java_resource_list_new_line_after_left_paren = false
ij_java_resource_list_right_paren_on_new_line = false
ij_java_resource_list_wrap = off
ij_java_rparen_on_new_line_in_record_header = false
ij_java_session_dd_suffix = EJB
ij_java_session_eb_suffix = Bean
ij_java_session_hi_suffix = Home
ij_java_session_lhi_prefix = Local
ij_java_session_lhi_suffix = Home
ij_java_session_li_prefix = Local
ij_java_session_si_suffix = Service
ij_java_space_after_closing_angle_bracket_in_type_argument = false
ij_java_space_after_colon = true
ij_java_space_after_comma = true
ij_java_space_after_comma_in_type_arguments = true
ij_java_space_after_for_semicolon = true
ij_java_space_after_quest = true
ij_java_space_after_type_cast = true
ij_java_space_before_annotation_array_initializer_left_brace = false
ij_java_space_before_annotation_parameter_list = false
ij_java_space_before_array_initializer_left_brace = false
ij_java_space_before_catch_keyword = true
ij_java_space_before_catch_left_brace = true
ij_java_space_before_catch_parentheses = true
ij_java_space_before_class_left_brace = true
ij_java_space_before_colon = true
ij_java_space_before_colon_in_foreach = true
ij_java_space_before_comma = false
ij_java_space_before_do_left_brace = true
ij_java_space_before_else_keyword = true
ij_java_space_before_else_left_brace = true
ij_java_space_before_finally_keyword = true
ij_java_space_before_finally_left_brace = true
ij_java_space_before_for_left_brace = true
ij_java_space_before_for_parentheses = true
ij_java_space_before_for_semicolon = false
ij_java_space_before_if_left_brace = true
ij_java_space_before_if_parentheses = true
ij_java_space_before_method_call_parentheses = false
ij_java_space_before_method_left_brace = true
ij_java_space_before_method_parentheses = false
ij_java_space_before_opening_angle_bracket_in_type_parameter = false
ij_java_space_before_quest = true
ij_java_space_before_switch_left_brace = true
ij_java_space_before_switch_parentheses = true
ij_java_space_before_synchronized_left_brace = true
ij_java_space_before_synchronized_parentheses = true
ij_java_space_before_try_left_brace = true
ij_java_space_before_try_parentheses = true
ij_java_space_before_type_parameter_list = false
ij_java_space_before_while_keyword = true
ij_java_space_before_while_left_brace = true
ij_java_space_before_while_parentheses = true
ij_java_space_inside_one_line_enum_braces = false
ij_java_space_within_empty_array_initializer_braces = false
ij_java_space_within_empty_method_call_parentheses = false
ij_java_space_within_empty_method_parentheses = false
ij_java_spaces_around_additive_operators = true
ij_java_spaces_around_assignment_operators = true
ij_java_spaces_around_bitwise_operators = true
ij_java_spaces_around_equality_operators = true
ij_java_spaces_around_lambda_arrow = true
ij_java_spaces_around_logical_operators = true
ij_java_spaces_around_method_ref_dbl_colon = false
ij_java_spaces_around_multiplicative_operators = true
ij_java_spaces_around_relational_operators = true
ij_java_spaces_around_shift_operators = true
ij_java_spaces_around_type_bounds_in_type_parameters = true
ij_java_spaces_around_unary_operator = false
ij_java_spaces_within_angle_brackets = false
ij_java_spaces_within_annotation_parentheses = false
ij_java_spaces_within_array_initializer_braces = false
ij_java_spaces_within_braces = false
ij_java_spaces_within_brackets = false
ij_java_spaces_within_cast_parentheses = false
ij_java_spaces_within_catch_parentheses = false
ij_java_spaces_within_for_parentheses = false
ij_java_spaces_within_if_parentheses = false
ij_java_spaces_within_method_call_parentheses = false
ij_java_spaces_within_method_parentheses = false
ij_java_spaces_within_parentheses = false
ij_java_spaces_within_switch_parentheses = false
ij_java_spaces_within_synchronized_parentheses = false
ij_java_spaces_within_try_parentheses = false
ij_java_spaces_within_while_parentheses = false
ij_java_special_else_if_treatment = true
ij_java_subclass_name_suffix = Impl
ij_java_ternary_operation_signs_on_next_line = false
ij_java_ternary_operation_wrap = off
ij_java_test_name_suffix = Test
ij_java_throws_keyword_wrap = off
ij_java_throws_list_wrap = off
ij_java_use_external_annotations = false
ij_java_use_fq_class_names = false
ij_java_use_relative_indents = false
ij_java_use_single_class_imports = true
ij_java_variable_annotation_wrap = off
ij_java_visibility = public
ij_java_while_brace_force = always
ij_java_while_on_new_line = true
ij_java_wrap_comments = false
ij_java_wrap_first_method_in_call_chain = false
ij_java_wrap_long_lines = false
[.editorconfig]
ij_editorconfig_align_group_field_declarations = false
ij_editorconfig_space_after_colon = false
ij_editorconfig_space_after_comma = true
ij_editorconfig_space_before_colon = false
ij_editorconfig_space_before_comma = false
ij_editorconfig_spaces_around_assignment_operators = true
[{*.ant,*.fxml,*.jhm,*.jnlp,*.jrxml,*.pom,*.qrc,*.rng,*.tld,*.wadl,*.wsdd,*.wsdl,*.xjb,*.xml,*.xsd,*.xsl,*.xslt,*.xul}]
ij_xml_align_attributes = true
ij_xml_align_text = false
ij_xml_attribute_wrap = normal
ij_xml_block_comment_at_first_column = true
ij_xml_keep_blank_lines = 2
ij_xml_keep_indents_on_empty_lines = false
ij_xml_keep_line_breaks = true
ij_xml_keep_line_breaks_in_text = true
ij_xml_keep_whitespaces = false
ij_xml_keep_whitespaces_around_cdata = preserve
ij_xml_keep_whitespaces_inside_cdata = false
ij_xml_line_comment_at_first_column = true
ij_xml_space_after_tag_name = false
ij_xml_space_around_equals_in_attribute = false
ij_xml_space_inside_empty_tag = false
ij_xml_text_wrap = normal
[{*.bash,*.sh,*.zsh}]
indent_size = 2
tab_width = 2
ij_shell_binary_ops_start_line = false
ij_shell_keep_column_alignment_padding = false
ij_shell_minify_program = false
ij_shell_redirect_followed_by_space = false
ij_shell_switch_cases_indented = false
[{*.cjs,*.js}]
ij_continuation_indent_size = 4
ij_javascript_align_imports = false
ij_javascript_align_multiline_array_initializer_expression = false
ij_javascript_align_multiline_binary_operation = false
ij_javascript_align_multiline_chained_methods = false
ij_javascript_align_multiline_extends_list = false
ij_javascript_align_multiline_for = true
ij_javascript_align_multiline_parameters = true
ij_javascript_align_multiline_parameters_in_calls = false
ij_javascript_align_multiline_ternary_operation = false
ij_javascript_align_object_properties = 0
ij_javascript_align_union_types = false
ij_javascript_align_var_statements = 0
ij_javascript_array_initializer_new_line_after_left_brace = false
ij_javascript_array_initializer_right_brace_on_new_line = false
ij_javascript_array_initializer_wrap = off
ij_javascript_assignment_wrap = off
ij_javascript_binary_operation_sign_on_next_line = false
ij_javascript_binary_operation_wrap = off
ij_javascript_blacklist_imports = rxjs/Rx,node_modules/**,**/node_modules/**,@angular/material,@angular/material/typings/**
ij_javascript_blank_lines_after_imports = 1
ij_javascript_blank_lines_around_class = 1
ij_javascript_blank_lines_around_field = 0
ij_javascript_blank_lines_around_function = 1
ij_javascript_blank_lines_around_method = 1
ij_javascript_block_brace_style = end_of_line
ij_javascript_call_parameters_new_line_after_left_paren = false
ij_javascript_call_parameters_right_paren_on_new_line = false
ij_javascript_call_parameters_wrap = off
ij_javascript_catch_on_new_line = false
ij_javascript_chained_call_dot_on_new_line = true
ij_javascript_class_brace_style = end_of_line
ij_javascript_comma_on_new_line = false
ij_javascript_do_while_brace_force = never
ij_javascript_else_on_new_line = false
ij_javascript_enforce_trailing_comma = keep
ij_javascript_extends_keyword_wrap = off
ij_javascript_extends_list_wrap = off
ij_javascript_field_prefix = _
ij_javascript_file_name_style = relaxed
ij_javascript_finally_on_new_line = false
ij_javascript_for_brace_force = never
ij_javascript_for_statement_new_line_after_left_paren = false
ij_javascript_for_statement_right_paren_on_new_line = false
ij_javascript_for_statement_wrap = off
ij_javascript_force_quote_style = false
ij_javascript_force_semicolon_style = false
ij_javascript_function_expression_brace_style = end_of_line
ij_javascript_if_brace_force = never
ij_javascript_import_merge_members = global
ij_javascript_import_prefer_absolute_path = global
ij_javascript_import_sort_members = true
ij_javascript_import_sort_module_name = false
ij_javascript_import_use_node_resolution = true
ij_javascript_imports_wrap = on_every_item
ij_javascript_indent_case_from_switch = true
ij_javascript_indent_chained_calls = true
ij_javascript_indent_package_children = 0
ij_javascript_jsx_attribute_value = braces
ij_javascript_keep_blank_lines_in_code = 2
ij_javascript_keep_first_column_comment = true
ij_javascript_keep_indents_on_empty_lines = false
ij_javascript_keep_line_breaks = true
ij_javascript_keep_simple_blocks_in_one_line = false
ij_javascript_keep_simple_methods_in_one_line = false
ij_javascript_line_comment_add_space = true
ij_javascript_line_comment_at_first_column = false
ij_javascript_method_brace_style = end_of_line
ij_javascript_method_call_chain_wrap = off
ij_javascript_method_parameters_new_line_after_left_paren = false
ij_javascript_method_parameters_right_paren_on_new_line = false
ij_javascript_method_parameters_wrap = off
ij_javascript_object_literal_wrap = on_every_item
ij_javascript_parentheses_expression_new_line_after_left_paren = false
ij_javascript_parentheses_expression_right_paren_on_new_line = false
ij_javascript_place_assignment_sign_on_next_line = false
ij_javascript_prefer_as_type_cast = false
ij_javascript_prefer_explicit_types_function_expression_returns = false
ij_javascript_prefer_explicit_types_function_returns = false
ij_javascript_prefer_explicit_types_vars_fields = false
ij_javascript_prefer_parameters_wrap = false
ij_javascript_reformat_c_style_comments = false
ij_javascript_space_after_colon = true
ij_javascript_space_after_comma = true
ij_javascript_space_after_dots_in_rest_parameter = false
ij_javascript_space_after_generator_mult = true
ij_javascript_space_after_property_colon = true
ij_javascript_space_after_quest = true
ij_javascript_space_after_type_colon = true
ij_javascript_space_after_unary_not = false
ij_javascript_space_before_async_arrow_lparen = true
ij_javascript_space_before_catch_keyword = true
ij_javascript_space_before_catch_left_brace = true
ij_javascript_space_before_catch_parentheses = true
ij_javascript_space_before_class_lbrace = true
ij_javascript_space_before_class_left_brace = true
ij_javascript_space_before_colon = true
ij_javascript_space_before_comma = false
ij_javascript_space_before_do_left_brace = true
ij_javascript_space_before_else_keyword = true
ij_javascript_space_before_else_left_brace = true
ij_javascript_space_before_finally_keyword = true
ij_javascript_space_before_finally_left_brace = true
ij_javascript_space_before_for_left_brace = true
ij_javascript_space_before_for_parentheses = true
ij_javascript_space_before_for_semicolon = false
ij_javascript_space_before_function_left_parenth = true
ij_javascript_space_before_generator_mult = false
ij_javascript_space_before_if_left_brace = true
ij_javascript_space_before_if_parentheses = true
ij_javascript_space_before_method_call_parentheses = false
ij_javascript_space_before_method_left_brace = true
ij_javascript_space_before_method_parentheses = false
ij_javascript_space_before_property_colon = false
ij_javascript_space_before_quest = true
ij_javascript_space_before_switch_left_brace = true
ij_javascript_space_before_switch_parentheses = true
ij_javascript_space_before_try_left_brace = true
ij_javascript_space_before_type_colon = false
ij_javascript_space_before_unary_not = false
ij_javascript_space_before_while_keyword = true
ij_javascript_space_before_while_left_brace = true
ij_javascript_space_before_while_parentheses = true
ij_javascript_spaces_around_additive_operators = true
ij_javascript_spaces_around_arrow_function_operator = true
ij_javascript_spaces_around_assignment_operators = true
ij_javascript_spaces_around_bitwise_operators = true
ij_javascript_spaces_around_equality_operators = true
ij_javascript_spaces_around_logical_operators = true
ij_javascript_spaces_around_multiplicative_operators = true
ij_javascript_spaces_around_relational_operators = true
ij_javascript_spaces_around_shift_operators = true
ij_javascript_spaces_around_unary_operator = false
ij_javascript_spaces_within_array_initializer_brackets = false
ij_javascript_spaces_within_brackets = false
ij_javascript_spaces_within_catch_parentheses = false
ij_javascript_spaces_within_for_parentheses = false
ij_javascript_spaces_within_if_parentheses = false
ij_javascript_spaces_within_imports = false
ij_javascript_spaces_within_interpolation_expressions = false
ij_javascript_spaces_within_method_call_parentheses = false
ij_javascript_spaces_within_method_parentheses = false
ij_javascript_spaces_within_object_literal_braces = false
ij_javascript_spaces_within_object_type_braces = true
ij_javascript_spaces_within_parentheses = false
ij_javascript_spaces_within_switch_parentheses = false
ij_javascript_spaces_within_type_assertion = false
ij_javascript_spaces_within_union_types = true
ij_javascript_spaces_within_while_parentheses = false
ij_javascript_special_else_if_treatment = true
ij_javascript_ternary_operation_signs_on_next_line = false
ij_javascript_ternary_operation_wrap = off
ij_javascript_union_types_wrap = on_every_item
ij_javascript_use_chained_calls_group_indents = false
ij_javascript_use_double_quotes = true
ij_javascript_use_explicit_js_extension = global
ij_javascript_use_path_mapping = always
ij_javascript_use_public_modifier = false
ij_javascript_use_semicolon_after_statement = true
ij_javascript_var_declaration_wrap = normal
ij_javascript_while_brace_force = never
ij_javascript_while_on_new_line = false
ij_javascript_wrap_comments = false
[{*.gant,*.gradle,*.groovy,*.gy}]
ij_groovy_align_group_field_declarations = false
ij_groovy_align_multiline_array_initializer_expression = false
ij_groovy_align_multiline_assignment = false
ij_groovy_align_multiline_binary_operation = false
ij_groovy_align_multiline_chained_methods = false
ij_groovy_align_multiline_extends_list = false
ij_groovy_align_multiline_for = true
ij_groovy_align_multiline_list_or_map = true
ij_groovy_align_multiline_method_parentheses = false
ij_groovy_align_multiline_parameters = true
ij_groovy_align_multiline_parameters_in_calls = false
ij_groovy_align_multiline_resources = true
ij_groovy_align_multiline_ternary_operation = false
ij_groovy_align_multiline_throws_list = false
ij_groovy_align_named_args_in_map = true
ij_groovy_align_throws_keyword = false
ij_groovy_array_initializer_new_line_after_left_brace = false
ij_groovy_array_initializer_right_brace_on_new_line = false
ij_groovy_array_initializer_wrap = off
ij_groovy_assert_statement_wrap = off
ij_groovy_assignment_wrap = off
ij_groovy_binary_operation_wrap = off
ij_groovy_blank_lines_after_class_header = 0
ij_groovy_blank_lines_after_imports = 1
ij_groovy_blank_lines_after_package = 1
ij_groovy_blank_lines_around_class = 1
ij_groovy_blank_lines_around_field = 0
ij_groovy_blank_lines_around_field_in_interface = 0
ij_groovy_blank_lines_around_method = 1
ij_groovy_blank_lines_around_method_in_interface = 1
ij_groovy_blank_lines_before_imports = 1
ij_groovy_blank_lines_before_method_body = 0
ij_groovy_blank_lines_before_package = 0
ij_groovy_block_brace_style = end_of_line
ij_groovy_block_comment_at_first_column = true
ij_groovy_call_parameters_new_line_after_left_paren = false
ij_groovy_call_parameters_right_paren_on_new_line = false
ij_groovy_call_parameters_wrap = off
ij_groovy_catch_on_new_line = false
ij_groovy_class_annotation_wrap = split_into_lines
ij_groovy_class_brace_style = end_of_line
ij_groovy_class_count_to_use_import_on_demand = 5
ij_groovy_do_while_brace_force = never
ij_groovy_else_on_new_line = false
ij_groovy_enum_constants_wrap = off
ij_groovy_extends_keyword_wrap = off
ij_groovy_extends_list_wrap = off
ij_groovy_field_annotation_wrap = split_into_lines
ij_groovy_finally_on_new_line = false
ij_groovy_for_brace_force = never
ij_groovy_for_statement_new_line_after_left_paren = false
ij_groovy_for_statement_right_paren_on_new_line = false
ij_groovy_for_statement_wrap = off
ij_groovy_if_brace_force = never
ij_groovy_import_annotation_wrap = 2
ij_groovy_imports_layout = *,|,javax.**,java.**,|,$*
ij_groovy_indent_case_from_switch = true
ij_groovy_indent_label_blocks = true
ij_groovy_insert_inner_class_imports = false
ij_groovy_keep_blank_lines_before_right_brace = 2
ij_groovy_keep_blank_lines_in_code = 2
ij_groovy_keep_blank_lines_in_declarations = 2
ij_groovy_keep_control_statement_in_one_line = true
ij_groovy_keep_first_column_comment = true
ij_groovy_keep_indents_on_empty_lines = false
ij_groovy_keep_line_breaks = true
ij_groovy_keep_multiple_expressions_in_one_line = false
ij_groovy_keep_simple_blocks_in_one_line = false
ij_groovy_keep_simple_classes_in_one_line = true
ij_groovy_keep_simple_lambdas_in_one_line = true
ij_groovy_keep_simple_methods_in_one_line = true
ij_groovy_label_indent_absolute = false
ij_groovy_label_indent_size = 0
ij_groovy_lambda_brace_style = end_of_line
ij_groovy_layout_static_imports_separately = true
ij_groovy_line_comment_add_space = false
ij_groovy_line_comment_at_first_column = true
ij_groovy_method_annotation_wrap = split_into_lines
ij_groovy_method_brace_style = end_of_line
ij_groovy_method_call_chain_wrap = off
ij_groovy_method_parameters_new_line_after_left_paren = false
ij_groovy_method_parameters_right_paren_on_new_line = false
ij_groovy_method_parameters_wrap = off
ij_groovy_modifier_list_wrap = false
ij_groovy_names_count_to_use_import_on_demand = 3
ij_groovy_parameter_annotation_wrap = off
ij_groovy_parentheses_expression_new_line_after_left_paren = false
ij_groovy_parentheses_expression_right_paren_on_new_line = false
ij_groovy_prefer_parameters_wrap = false
ij_groovy_resource_list_new_line_after_left_paren = false
ij_groovy_resource_list_right_paren_on_new_line = false
ij_groovy_resource_list_wrap = off
ij_groovy_space_after_assert_separator = true
ij_groovy_space_after_colon = true
ij_groovy_space_after_comma = true
ij_groovy_space_after_comma_in_type_arguments = true
ij_groovy_space_after_for_semicolon = true
ij_groovy_space_after_quest = true
ij_groovy_space_after_type_cast = true
ij_groovy_space_before_annotation_parameter_list = false
ij_groovy_space_before_array_initializer_left_brace = false
ij_groovy_space_before_assert_separator = false
ij_groovy_space_before_catch_keyword = true
ij_groovy_space_before_catch_left_brace = true
ij_groovy_space_before_catch_parentheses = true
ij_groovy_space_before_class_left_brace = true
ij_groovy_space_before_closure_left_brace = true
ij_groovy_space_before_colon = true
ij_groovy_space_before_comma = false
ij_groovy_space_before_do_left_brace = true
ij_groovy_space_before_else_keyword = true
ij_groovy_space_before_else_left_brace = true
ij_groovy_space_before_finally_keyword = true
ij_groovy_space_before_finally_left_brace = true
ij_groovy_space_before_for_left_brace = true
ij_groovy_space_before_for_parentheses = true
ij_groovy_space_before_for_semicolon = false
ij_groovy_space_before_if_left_brace = true
ij_groovy_space_before_if_parentheses = true
ij_groovy_space_before_method_call_parentheses = false
ij_groovy_space_before_method_left_brace = true
ij_groovy_space_before_method_parentheses = false
ij_groovy_space_before_quest = true
ij_groovy_space_before_switch_left_brace = true
ij_groovy_space_before_switch_parentheses = true
ij_groovy_space_before_synchronized_left_brace = true
ij_groovy_space_before_synchronized_parentheses = true
ij_groovy_space_before_try_left_brace = true
ij_groovy_space_before_try_parentheses = true
ij_groovy_space_before_while_keyword = true
ij_groovy_space_before_while_left_brace = true
ij_groovy_space_before_while_parentheses = true
ij_groovy_space_in_named_argument = true
ij_groovy_space_in_named_argument_before_colon = false
ij_groovy_space_within_empty_array_initializer_braces = false
ij_groovy_space_within_empty_method_call_parentheses = false
ij_groovy_spaces_around_additive_operators = true
ij_groovy_spaces_around_assignment_operators = true
ij_groovy_spaces_around_bitwise_operators = true
ij_groovy_spaces_around_equality_operators = true
ij_groovy_spaces_around_lambda_arrow = true
ij_groovy_spaces_around_logical_operators = true
ij_groovy_spaces_around_multiplicative_operators = true
ij_groovy_spaces_around_regex_operators = true
ij_groovy_spaces_around_relational_operators = true
ij_groovy_spaces_around_shift_operators = true
ij_groovy_spaces_within_annotation_parentheses = false
ij_groovy_spaces_within_array_initializer_braces = false
ij_groovy_spaces_within_braces = true
ij_groovy_spaces_within_brackets = false
ij_groovy_spaces_within_cast_parentheses = false
ij_groovy_spaces_within_catch_parentheses = false
ij_groovy_spaces_within_for_parentheses = false
ij_groovy_spaces_within_gstring_injection_braces = false
ij_groovy_spaces_within_if_parentheses = false
ij_groovy_spaces_within_list_or_map = false
ij_groovy_spaces_within_method_call_parentheses = false
ij_groovy_spaces_within_method_parentheses = false
ij_groovy_spaces_within_parentheses = false
ij_groovy_spaces_within_switch_parentheses = false
ij_groovy_spaces_within_synchronized_parentheses = false
ij_groovy_spaces_within_try_parentheses = false
ij_groovy_spaces_within_tuple_expression = false
ij_groovy_spaces_within_while_parentheses = false
ij_groovy_special_else_if_treatment = true
ij_groovy_ternary_operation_wrap = off
ij_groovy_throws_keyword_wrap = off
ij_groovy_throws_list_wrap = off
ij_groovy_use_flying_geese_braces = false
ij_groovy_use_fq_class_names = false
ij_groovy_use_fq_class_names_in_javadoc = true
ij_groovy_use_relative_indents = false
ij_groovy_use_single_class_imports = true
ij_groovy_variable_annotation_wrap = off
ij_groovy_while_brace_force = never
ij_groovy_while_on_new_line = false
ij_groovy_wrap_long_lines = false
[{*.htm,*.html,*.sht,*.shtm,*.shtml}]
ij_html_add_new_line_before_tags = body,div,p,form,h1,h2,h3
ij_html_align_attributes = true
ij_html_align_text = false
ij_html_attribute_wrap = normal
ij_html_block_comment_at_first_column = true
ij_html_do_not_align_children_of_min_lines = 0
ij_html_do_not_break_if_inline_tags = title,h1,h2,h3,h4,h5,h6,p
ij_html_do_not_indent_children_of_tags = html,body,thead,tbody,tfoot
ij_html_enforce_quotes = false
ij_html_inline_tags = a,abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var
ij_html_keep_blank_lines = 2
ij_html_keep_indents_on_empty_lines = false
ij_html_keep_line_breaks = true
ij_html_keep_line_breaks_in_text = true
ij_html_keep_whitespaces = false
ij_html_keep_whitespaces_inside = span,pre,textarea
ij_html_line_comment_at_first_column = true
ij_html_new_line_after_last_attribute = never
ij_html_new_line_before_first_attribute = never
ij_html_quote_style = double
ij_html_remove_new_line_before_tags = br
ij_html_space_after_tag_name = false
ij_html_space_around_equality_in_attribute = false
ij_html_space_inside_empty_tag = false
ij_html_text_wrap = normal
ij_html_uniform_ident = false
[{*.properties,spring.handlers,spring.schemas}]
ij_properties_align_group_field_declarations = false
ij_properties_keep_blank_lines = false
ij_properties_key_value_delimiter = equals
ij_properties_spaces_around_key_value_delimiter = false
[{*.yaml,*.yml}]
indent_size = 2
ij_yaml_keep_indents_on_empty_lines = false
ij_yaml_keep_line_breaks = true
ij_yaml_space_before_colon = true
ij_yaml_spaces_within_braces = true
ij_yaml_spaces_within_brackets = true
================================================
FILE: .githooks/pre-commit
================================================
#!/bin/sh
set -e
# stash any unstaged changes
git stash push -m "prePush" -q --keep-index
# unstash the unstashed changes (if any) on exit or interrupt
function unstash {
git stash apply stash^{/prePush} -q || true
}
trap unstash EXIT
./gradlew check test -q
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
A test replicating the bug will be more helpful than just a description of your issue.
For example, this can be a JMH test showing a performance issue or a unit test showing a logic error.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Desktop (please complete the following information):**
- OS: [e.g. Linux]
- Version [e.g. 3.4.4]
- JVM Version [e.g. Azul Zulu 11]
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
================================================
FILE: .github/workflows/asciidoc-build-only.yml
================================================
name: Generate Documentation from ASCIIDoc
on:
push:
branches-ignore: [ master ]
pull_request:
branches: [ master ]
jobs:
checkout-and-deploy:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11 ]
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up java
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- name: Build ASCIIDoc with Gradle
run: ./gradlew clean asciidoctor
================================================
FILE: .github/workflows/asciidoc.yml
================================================
name: Generate Github Pages from ASCIIDoc
on:
push:
branches: [ master ]
permissions:
contents: write
jobs:
checkout-and-deploy:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11 ]
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up java
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- name: Build ASCIIDoc with Gradle
run: ./gradlew clean asciidoctor
- name: Simple deploy with git
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/docs/asciidoc/en/
================================================
FILE: .github/workflows/codeql-analysis.yml
================================================
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '33 3 * * 3'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'java' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'zulu'
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
================================================
FILE: .github/workflows/gradle-build.yml
================================================
name: Java CI with Gradle
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11, 17, 21 ]
name: Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v2
- name: Set up java
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: libs-and-reports-${{ matrix.java }}
path: |
build/libs
build/reports
================================================
FILE: .github/workflows/gradle-wrapper-validation.yml
================================================
name: "Validate Gradle Wrapper"
on: [push, pull_request]
jobs:
validation:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
================================================
FILE: .github/workflows/jcstress-manual.yml
================================================
name: JCStress Testing - manual testing
on:
workflow_dispatch:
inputs :
mode :
description : 'JCStress run mode: sanity, quick, default, tough, stress'
required : true
default : 'default'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11, 17, 21 ]
name: Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v2
- name: Set up java
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew jcstress -Pmode="${{ github.event.inputs.mode }}"
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: jcstress-report-manual-${{ matrix.java }}
path: build/reports/jcstress
================================================
FILE: .github/workflows/jcstress-quick.yml
================================================
name: JCStress Testing - commit-level quick check
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11, 17, 21 ]
name: Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v2
- name: Set up java
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew jcstress -Pmode=quick
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: jcstress-report-quick-${{ matrix.java }}
path: build/reports/jcstress
================================================
FILE: .gitignore
================================================
/bin
/build
/.gradle
/out
.DS_Store
*~
classes
code
templib
SConstruct
.*dblite
pom.xml
.project
.classpath
.settings
.idea
*.iml
*.ipr
*.iws
*-gc.log
gradle.properties
src/jmh/generated_tests
src/jcstress/generated_tests
================================================
FILE: .lgtm.yml
================================================
extraction:
java:
index:
java_version: 11
================================================
FILE: CHANGELOG.adoc
================================================
:Author: LMAX Development Team
:Email:
:Date: {docdata}
include::./src/docs/asciidoc/en/changelog.adoc[]
================================================
FILE: LICENCE.txt
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.adoc
================================================
= LMAX Disruptor
image:https://github.com/LMAX-Exchange/disruptor/workflows/Java%20CI%20with%20Gradle/badge.svg[Java CI with Gradle,link=https://github.com/LMAX-Exchange/disruptor/actions/workflows/gradle-build.yml]
image:https://github.com/LMAX-Exchange/disruptor/workflows/CodeQL/badge.svg[CodeQL,link=https://github.com/LMAX-Exchange/disruptor/actions/workflows/codeql-analysis.yml]
image:https://img.shields.io/github/license/LMAX-Exchange/disruptor[License,link=https://github.com/LMAX-Exchange/disruptor/blob/master/LICENCE.txt]
A High Performance Inter-Thread Messaging Library
== Maintainer
LMAX Development Team
== Support
- Open a ticket in GitHub https://github.com/LMAX-Exchange/disruptor/issues[issue tracker]
- https://groups.google.com/group/lmax-disruptor[Google Group]
== Documentation
* https://lmax-exchange.github.io/disruptor/[Overview]
* https://lmax-exchange.github.io/disruptor/user-guide/index.html[User Guide]
* https://lmax-exchange.github.io/disruptor/javadoc/com.lmax.disruptor/module-summary.html[API Documentation]
* https://lmax-exchange.github.io/disruptor/developer-guide/index.html[Developer Guide]
* https://github.com/LMAX-Exchange/disruptor/wiki/Frequently-Asked-Questions[FAQ]
================================================
FILE: build.gradle
================================================
/*
* Copyright 2011 LMAX Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'checkstyle'
id 'idea'
id "io.github.reyerizo.gradle.jcstress" version "0.8.15"
id 'org.asciidoctor.jvm.convert' version '3.3.2'
id "me.champeau.jmh" version "0.6.8"
id "biz.aQute.bnd.builder" version "6.3.1"
}
group = 'com.lmax'
version = new Version(major: 4, minor: 0, revision: 0, snapshot: true)
defaultTasks 'build'
ext {
fullName = 'Disruptor Framework'
fullDescription = 'Disruptor - Concurrent Programming Framework'
teamName = 'LMAX Disruptor Development Team'
siteUrl = 'https://lmax-exchange.github.io/disruptor'
sourceUrl = 'git@github.com:LMAX-Exchange/disruptor.git'
moduleName = 'com.lmax.disruptor'
}
apply from: 'gradle/maven.gradle'
apply from: 'gradle/perf.gradle'
apply from: 'gradle/jmh.gradle'
apply from: 'gradle/asciidoc.gradle'
apply from: 'gradle/jcstress.gradle'
wrapper.gradleVersion = '7.6'
repositories {
mavenCentral()
}
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_11
dependencies {
checkstyle 'com.puppycrawl.tools:checkstyle:10.4'
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0'
testImplementation 'org.hamcrest:hamcrest:2.2'
}
compileJava {
options.fork = true
options.debug = true
options.warnings = true
options.deprecation = true
}
compileTestJava {
options.fork = true
options.debug = true
options.warnings = true
options.deprecation = true
}
test {
useJUnitPlatform()
systemProperties = [
'junit.jupiter.execution.parallel.enabled': 'true',
'junit.jupiter.execution.parallel.mode.default': 'concurrent'
]
}
javadoc {
title = 'Disruptor'
options.addStringOption('XDignore.symbol.file', '-quiet')
options.author = true
options.bottom = "<i>Copyright © 2011 - ${Calendar.instance[Calendar.YEAR]} LMAX Ltd. All Rights Reserved.</i>"
options.use = true
options.version = true
options.showFromPublic()
}
jar {
manifest.attributes('Built-By': System.properties.get('user.name'),
'Automatic-Module-Name': moduleName)
bnd(
'-exportcontents': 'com.lmax.disruptor.*;-noimport:=true',
'-noimportjava': 'true',
'Import-Package': '!*',
'Bundle-Name': fullName,
'Bundle-Vendor': teamName,
'Bundle-Description': fullDescription,
'Bundle-DocURL': siteUrl,
'Bundle-SymbolicName': moduleName,
)
}
tasks.withType(Test) {
maxParallelForks = (int) Math.max(Math.floor(Runtime.runtime.availableProcessors() / 2), 1)
}
task setUpGitHooks(type: Exec, description: 'Add a pre-commit git hook that runs gradle check & test tasks') {
def hooksFolder = file('.githooks').getAbsolutePath()
commandLine 'git', 'config', 'core.hooksPath', hooksFolder
}
class Version {
int major, minor = 0, revision = 0
boolean snapshot
String stage
String toString() {
"$major.$minor.$revision${stage ? '.' + stage : ''}${snapshot ? '-SNAPSHOT' : ''}"
}
}
sourceSets {
examples {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
================================================
FILE: config/checkstyle/checkstyle.xml
================================================
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="SeverityMatchFilter">
<property name="severity" value="info"/>
<property name="acceptOnMatch" value="false"/>
</module>
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
<module name="SuppressionFilter">
<property name="file" value="${config_loc}/suppress.xml"/>
</module>
<module name="LineLength">
<property name="max" value="200"/>
<property name="ignorePattern" value="^[ \t]*\*.*@.*$"/>
</module>
<module name="TreeWalker">
<property name="tabWidth" value="4"/>
<property name="severity" value="error"/>
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName">
<property name="format" value="^[a-z][a-zA-Z0-9_]*$"/>
</module>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<module name="AvoidStarImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="EmptyForInitializerPad"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceBefore"/>
<module name="WhitespaceAfter">
<property name="tokens"
value="COMMA, SEMI, TYPECAST, LITERAL_IF, LITERAL_ELSE,
LITERAL_WHILE, LITERAL_DO, LITERAL_FOR, DO_WHILE"/>
</module>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyLambdas" value="true"/>
<property name="allowEmptyMethods" value="true"/>
<property name="allowEmptyTypes" value="true"/>
<property name="allowEmptyLoops" value="true"/>
<property name="ignoreEnhancedForColon" value="false"/>
<property name="tokens"
value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR,
BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, DO_WHILE, EQUAL, GE, GT, LAMBDA, LAND,
LCURLY, LE, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY,
LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH, LITERAL_SYNCHRONIZED,
LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN,
NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR,
SR_ASSIGN, STAR, STAR_ASSIGN, LITERAL_ASSERT, TYPE_EXTENSION_AND"/>
<message key="ws.notFollowed"
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
<message key="ws.notPreceded"
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
</module>
<module name="OperatorWrap">
<property name="tokens" value="PLUS, ASSIGN"/>
<property name="option" value="eol"/>
</module>
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<module name="NestedTryDepth">
<property name="max" value="2"/>
</module>
<module name="CovariantEquals"/>
<module name="NeedBraces">
<property name="tokens"
value="LITERAL_DO, LITERAL_ELSE, LITERAL_FOR, LITERAL_IF, LITERAL_WHILE"/>
</module>
<module name="LeftCurly">
<property name="option" value="nl"/>
</module>
<module name="RightCurly">
<property name="option" value="alone"/>
</module>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="DefaultComesLast"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
<module name="PackageDeclaration"/>
<module name="ReturnCount">
<property name="max" value="3"/>
</module>
<module name="FallThrough"/>
<module name="FinalClass"/>
<module name="MutableException"/>
<module name="ArrayTypeStyle"/>
<module name="TodoComment">
<property name="severity" value="info"/>
<property name="format" value="TODO"/>
</module>
<module name="UpperEll"/>
<module name="IllegalType">
<property name="legalAbstractClassNames"
value="AbstractBeanDefinition, AbstractAccountEvInstruction, AbstractEmsInstruction, AbstractEvInstruction, AbstractEmsAction, AbstractInstrumentAction, AbstractEntry"/>
<property name="illegalClassNames"
value="java.util.GregorianCalendar, java.util.Hashtable, java.util.Vector"/>
</module>
<module name="DescendantToken">
<property name="tokens" value="LITERAL_ASSERT"/>
<property name="limitedTokens"
value="ASSIGN,DEC,INC,POST_DEC,POST_INC,PLUS_ASSIGN,MINUS_ASSIGN,STAR_ASSIGN,DIV_ASSIGN,MOD_ASSIGN,BSR_ASSIGN,SR_ASSIGN,SL_ASSIGN,BAND_ASSIGN,BXOR_ASSIGN,BOR_ASSIGN,METHOD_CALL"/>
<property name="maximumNumber" value="2"/>
</module>
<module name="Regexp">
<property name="format" value="[ \t]+$"/>
<property name="illegalPattern" value="true"/>
<property name="message" value="Trailing whitespace"/>
</module>
<module name="FinalParameters"/>
<module name="JavadocParagraph"/>
<module name="SingleLineJavadoc"/>
<module name="JavadocMethod">
<property name="accessModifiers" value="public"/>
</module>
<module name="JavadocType">
<property name="scope" value="public"/>
</module>
<module name="JavadocVariable">
<property name="scope" value="public"/>
</module>
<module name="IllegalInstantiation"/>
<module name="MagicNumber"/>
<module name="MissingSwitchDefault"/>
</module>
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>
</module>
================================================
FILE: config/checkstyle/suppress.xml
================================================
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
<suppressions>
<suppress checks="JavadocType"
files="(examples|jcstress|perf|jmh|test)[\\/].*"/>
<suppress checks="JavadocVariable"
files="(examples|jcstress|perf|jmh|test)[\\/].*"/>
<suppress checks="JavadocMethod"
files="(examples|jcstress|perf|jmh|test)[\\/].*"/>
<suppress checks="MagicNumber"
files="(examples|jcstress|perf|jmh|test)[\\/].*"/>
<suppress checks="MissingSwitchDefault"
files="(examples|jcstress|perf|jmh|test)[\\/].*"/>
<suppress checks="FinalParameters"
files="(examples)[\\/].*"/>
</suppressions>
================================================
FILE: gradle/asciidoc.gradle
================================================
//
// Configure ASCIIDoc publishing
//
asciidoctor {
languages 'en'
resources {
from(javadoc) {
into './javadoc'
}
from('src/docs/resources') {
into './resources'
}
from('src/docs/files') {
into './files'
}
}
// The attributes set here appear to _completely_ override whatever is set in
// the documents themselves - so to some degree it's pointless setting anything
// at a document level. That said, IntelliJ IDEA doesn't know this, so it's
// still kind of nice to have them at a document level so it doesn't complain!
attributes 'source-highlighter': 'rouge',
'toc': 'left',
'icons': 'font',
'xrefstyle': 'short',
'imagesdir': '.'
copyResourcesOnlyIf 'html5'
baseDirFollowsSourceFile()
asciidoctorj.version = '2.4.3'
}
================================================
FILE: gradle/jcstress.gradle
================================================
//
// Configure JCStress
//
jcstress {
jcstressDependency 'org.openjdk.jcstress:jcstress-core:0.11'
includeTests = true
mode = project.getProperties().getOrDefault("mode", "quick")
}
================================================
FILE: gradle/jmh.gradle
================================================
//
// Configure JMH benchmarks
//
sourceSets {
jmh {
compileClasspath += sourceSets.main.output + sourceSets.test.output
runtimeClasspath += sourceSets.main.output + sourceSets.test.output
}
}
def jmhLibVersion = '1.35'
dependencies {
jmhImplementation "org.openjdk.jmh:jmh-core:${jmhLibVersion}"
jmhAnnotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:${jmhLibVersion}"
jmhImplementation 'net.openhft:affinity:3.23.2'
}
jmh {
jmhVersion = jmhLibVersion
jvmArgsPrepend = ['-Xms256m -Xmx256m -XX:MaxDirectMemorySize=1g']
resultsFile.set(project.file("${project.buildDir}/reports/jmh/result.json"))
profilers = [ 'pauses' ]
resultFormat = 'JSON'
failOnError = true
verbosity = 'NORMAL'
includeTests = true
}
task jmhProfilers(type: JavaExec, description:'Lists the available profilers for the jmh task', group: 'jmh') {
classpath = sourceSets.jmh.runtimeClasspath
mainClass.set('org.openjdk.jmh.Main')
args '-lprof'
}
================================================
FILE: gradle/maven.gradle
================================================
//
// Configure publishing to Maven
//
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
disruptor(MavenPublication) {
from components.java
pom {
name = project.ext.fullName
description = project.ext.fullDescription
url = project.ext.siteUrl
scm {
url = "scm:${project.ext.sourceUrl}"
connection = "scm:${project.ext.sourceUrl}"
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'team'
name = teamName
email = 'lmax-disruptor@googlegroups.com'
}
}
}
}
}
repositories {
maven {
url project.hasProperty('sonatypeUrl') ? project['sonatypeUrl'] : 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
credentials {
username = project.hasProperty('sonatypeUsername') ? project['sonatypeUsername'] : 'fake-user'
password = project.hasProperty('sonatypePassword') ? project['sonatypePassword'] : 'fake-password'
}
}
}
}
signing {
sign publishing.publications.disruptor
}
================================================
FILE: gradle/perf.gradle
================================================
//
// Configure setting up performance tests
//
sourceSets {
perftest {
compileClasspath += sourceSets.main.output + sourceSets.test.output
runtimeClasspath += sourceSets.main.output + sourceSets.test.output
}
}
dependencies {
perftestCompileOnly 'org.hdrhistogram:HdrHistogram:2.1.12'
}
build.dependsOn perftestClasses
task perfJar(type: Jar, group: 'build') {
archiveAppendix.set('perf')
from sourceSets.perftest.output
from sourceSets.test.output
from { configurations.perftestCompileOnly.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
================================================
FILE: gradle/wrapper/gradle-wrapper.properties
================================================
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
================================================
FILE: gradlew
================================================
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"
================================================
FILE: gradlew.bat
================================================
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
================================================
FILE: settings.gradle
================================================
rootProject.name = 'disruptor'
================================================
FILE: src/docs/asciidoc/en/changelog.adoc
================================================
:Author: LMAX Development Team
:Email:
:Date: {docdata}
= Changelog
== 4.0.0
* Minimum Java version now 11
* Issue #323 - `WorkerPool` and `WorkProcessor` have been removed, no more `Disruptor::handleEventsWithWorkerPool`
* `Disruptor` constructors using `Executor` have been removed. Use `ThreadFactory` instead.
* Rolled up event handling extension interfaces on to `EventHandler`:
** `BatchStartAware`
** `LifecycleAware`
** `SequenceReportingEventHandler`
* `FatalExceptionHandler` and `IgnoreExceptionHandler` now use the JDK 9 Platform Logging API, i.e. `System.Logger`
* Add rewind batch feature to the `BatchEventProcessor`
* Add a maximum batch size argument to `BatchEventProcessor`
** `EventHandler::onBatchStart` now gets both the `batchSize` as well as `queueDepth` (previously it had `batchSize` which reported queue depth)
* Added documentation to `EventPoller`
* `Util::log2` throws if passed a non-positive argument
* Deprecations
** Deprecated `ThreadHints.onSpinWait()`
** Deprecated `Disruptor.handleExceptionsWith()` - this had been javadoc deprecated since 2015 but not in the code
** Removed previously deprecated methods
*** `Ringbuffer.resetTo()`
*** `ConsumerRepository.getLastSequenceInChain()`
== 3.4.3
- Add Automatic-Module-Name to MANIFEST.MF
== 3.4.2
- Fix race condition in BatchEventProcessor with 3 or more starting/halting concurrently.
== 3.4.1
- Fix race between run() and halt() on BatchEventProcessor.
== 3.4.0
- Drop support for JDK6, support JDK7 and above only.
- Add `ThreadHints.onSpinWait` to all busy spins within Disruptor.
- Increase default sleep time for LockSupport.parkNanos to prevent busy spinning.
== 3.3.8
- Revert belt and braces WaitStrategy signalling.
== 3.3.7
- Add batch size to `BatchStartAware.onBatchStart()`
- Upgrade to newer versions of gradle, checkstyle and JUnit
- Deprecate classes & methods for later release
- Remove JMock and rewrite tests accordingly
== 3.3.6
- Support adding gating sequences before calling Disruptor.start()
- Fix minor concurrency race when dynamically adding sequences
- Fix wrapping problem when adding work handlers to the Disruptor
== 3.3.5
- Fix NPE in TimeoutBlockingWaitStrategy when used with WorkProcessor
- Add LiteTimeoutBlockingWaitStrategy
- Resignal any waiting threads when trying to publish to a full ring buffer
== 3.3.4
- Small build fixes and refactorings
- Removed unused MutableLong class
== 3.3.3
- Support ThreadFactory in Disruptor DSL
- Make use of the Executor deprecated
== 3.3.2
- Minor Javadoc fixes, example code and file renames.
- Additional generics for parametrised ExceptionHandler.
== 3.3.1
- Minor Javadoc fixes, example code and file renames.
- Make ExceptionHandler type parametrised.
== 3.3.0
- Inheritance based Padding for RingBuffer and Sequencers.
- Better DSL support for adding custom EventProcessors.
- Remove deprecated methods (slightly breaking change)
- Experimental LiteBlockingWaitStrategy
- Experimental EventPoller for polling for data instead of waiting.
== 3.2.1 Released (10-Mar-2014)
- Minor build and IDE updates
- Rewrite of performance tests to run without JUnit and separate Queues in to their own tests
- Remove old throttled performance test
- Add performance tests for immutable message example
- Add performance tests for off-heap example
- Remove old Caliper tests
- Remove some stray yield() calls
== 3.2.0 Released (13-Aug-2013)
- Fix performance bug in WorkProcessor with MultiProducerSequencer
- Add EventRelease support to WorkProcessor (experimental)
- Add PingPongLatencyTest
- Switch to HdrHistogram for latency measurement
== 3.1.1 Released (9-Jul-2013)
- Fix bug in WorkProcessor where consumers could get ahead of publishers
== 3.1.0 Released (17-Jun-2013)
- Fix bug in Disruptor DSL where some consumers wouldn't be included in the gating sequences.
- Add support for using the EventTranslator with batch publication.
- Support timeouts when shutting down the Disruptor using the DSL.
== 3.0.1 Released (16-Apr-2013)
- Remove Sequencer.ensureAvailable() and move functionality into the ProcessingSequenceBarrier.
- Add get() method and deprecate getPublished() and getPreallocated() from the RingBuffer.
- Add TimeoutException to SequenceBarrier.waitFor().
- Fix off by one bug in MultiProducerSequencer.publish(lo, hi).
- Improve testing for Sequencers.
== 3.0.0 Released (10-Apr-2013)
- Add remaining capacity to RingBuffer
- Add batch publish methods to Sequencer
- Add DataProvider interface to decouple the RingBuffer and BatchEventProcessor
- Upgrade to gradle 1.5
== 3.0.0.beta5 Released (08-Apr-2013)
- Make Sequencer public
== 3.0.0.beta4 Released (08-Apr-2013)
- Refactoring, merge Publisher back into Sequencer and some of the gating sequence responsibilities up to the sequencer.
== 3.0.0.beta3 Released (20-Feb-2013)
- Significant Javadoc updates (thanks Jason Koch)
- DSL support for WorkerPool
- Small performance tweaks
- Add TimeoutHandler and TimeoutBlockingWaitStrategy and support timeouts in BatchEventProcessor
== 3.0.0.beta2 Released (7-Jan-2013)
- Remove millisecond wakeup from BlockingWaitStrategy
- Add RingBuffer.claimAndGetPreallocated
- Add RingBuffer.isPublished
== 3.0.0.beta1 Released (3-Jan-2013)
- Remove claim strategies and replace with Publishers/Sequences, remove pluggability of claim strategies.
- Introduce new multi-producer publisher algorithm (faster and more scalable).
- Introduce more flexible EventPublisher interface that allow for static definition of translators
that can handle local values.
- Allow for dynamic addition of gating sequences to ring buffer. Default it to empty, will allow
messages to be sent and the ring buffer to wrap if there are no gating sequences defined.
- Remove batch writes to the ring buffer.
- Remove timeout read methods.
- Switch to gradle build and layout the source maven style.
- API change, remove RingBuffer.get, add RingBuffer.getPreallocated for producers and
RingBuffer.getPublished for consumers.
- Change maven dependency group id to com.lmax.
- Added PhasedBackoffStrategy.
- Remove explicit claim/forcePublish and supply a resetTo method.
- Added better handling of cases when the gating sequence is ahead of the cursor value.
== 2.10.3 Released (22-Aug-2012)
- Bug fix, race condition in SequenceGroup when removing Sequences and getting current value
== 2.10.2 Released (21-Aug-2012)
- Bug fix, potential race condition in BlockingWaitStrategy.
- Bug fix set initial SequenceGroup value to -1 (Issue #27).
- Deprecate timeout methods that will be removed in version 3.
== 2.10.1 (6-June-2012)
- Bug fix, correct OSGI metadata.
- Remove unnecessary code in wait strategies.
== 2.10 (13-May-2012)
- Remove deprecated timeout methods.
- Added OSGI metadata to jar file.
- Removed PaddedAtomicLong and use Sequence in all places.
- Fix various generics warnings.
- Change Sequence implementation to work around IBM JDK bug and improve performance by ~10%.
- Add a remainingCapacity() call to the Sequencer class.
== 2.9 (8-Apr-2012)
- Deprecate timeout methods for publishing.
- Add tryNext and tryPublishEvent for events that shouldn't block during delivery.
- Small performance enhancement for MultithreadClaimStrategy.
== 2.8 (6-Feb-2012)
- Create new MultithreadClaimStrategy that works between when threads are highly contended. Previous implementation is now called MultithreadLowContentionClaimStrategy
- Fix for bug where EventProcessors weren't being added as gating sequences to the ring buffer.
- Fix range tracking bug in Histogram
== 2.7.1 (21-Dec-2011)
- Artefacts made available via maven central repository. (groupId:com.googlecode.disruptor, artifactId:disruptor) See UsingDisruptorInYourProject for details.
== 2.7 (12-Nov-2011)
- Changed construction API to allow user supplied claim and wait strategies
- Added AggregateEventHandler to support multiple EventHandlers from a single BatchEventProcessor
- Support exception handling from LifecycleAware
- Added timeout API calls for claiming a sequence when publishing
- Use LockSupport.parkNanos() instead of Thread.sleep() to reduce latency
- Reworked performance tests to better support profiling and use LinkedBlockingQueue for comparison because it performs better on the latest processors
- Minor bugfixes
== 2.6
- Introduced WorkerPool to allow the one time consumption of events by a worker in a pool of EventProcessors.
- New internal implementation of SequenceGroup which is lock free at all times and garbage free for get and set operations.
- SequenceBarrier now checks alert status on every call whether it is blocking or not.
- Added scripts in preparation for publishing binaries to maven repository.
== 2.5.1
- Bugfix for supporting SequenceReportingEventHandler from DSL. ([issue 9](https://github.com/LMAX-Exchange/disruptor/issues#issue/9))
- Bugfix for multi-threaded publishing to multiple ring buffers ([issue 10](https://github.com/LMAX-Exchange/disruptor/issues#issue/10))
- Change SequenceBarrier to always check alert status before entering waitFor cycle. Previously this was only checked when the requested sequence was not available.
- Change ClaimStrategy to not spin when the buffer has no available capacity, instead go straight to yielding to allow event processors to catch up.
== 2.5
- Changed RingBuffer and publisher API so any mutable object can be placed in the RingBuffer without having to extend AbstractEvent
- Added EventPublisher implementation to allow the publishing steps to be combined into one action
- DisruptorWizard has been renamed to Disruptor with added support for any subtype of EventProcessor
- Introduced a new Sequencer class that allows the Disruptor to be applied to other data structures such as multiple arrays. This can be a very useful pattern when multiple event processors work on the same event and you want to avoid false sharing. The Diamond for FizzBuzz is a good example of the issue. It is also higher performance by avoiding the pointer indirection when arrays of primitives are used.
- Further increased performance and scalability by reducing false sharing.
- Added progressive backoff strategy to the MultiThreadedClaimStrategy to prevent publisher getting into the claim cycle when the buffer is full because of a slow EventProcessor.
- Significantly improved performance to WaitStrategy.Option.BLOCKING
- Introduced SequenceGroup to allow dynamic registration of EventProcessors.
== 2.0.2
- Rework of "False Sharing" prevention which makes the performance much more predictable across all platforms. Special thanks to Jeff Hain for helping focus in on a solution.
== 2.0.1
- Renaming mistake for publishEventAtSequence should have been claimEventAtSequence
- Fixed bug in YieldingStrategy that was busy spinning more than yielding and introduced SleepingStrategy
- Removed code duplication in Unicast perf tests for expected result
== 2.0.0
- New API to reflect naming changes
- Producer -> Publisher
- Entry -> Event
- Consumer -> EventProcessor
- ConsumerBarrier -> DependencyBarrier
- ProducerBarrier has been incorporated into the RingBuffer for ease of use
- DisruptorWizard integrated for fluent API dependency graph construction
- Rework of sequence tracking to avoid false sharing on Java 7, plus avoid mega-morphic calls to make better use of the instruction cache
- Reduced usage of memory barriers where possible
- WaitStrategy.YIELDING initially spins for a short period to reduce latency
- Major performance improvement giving more than a 2X increase for throughput across most use cases.
== 1.2.2
- ProducerBarrier change to yield after busy spinning for a while. This may help the situation when the the number of producers exceeds the number of cores.
== 1.2.1
- Bug fix for setting the sequence in the ForceFillProducerBarrier.
- Code syntax tidy up.
== 1.2.0
- Bug fix for regression introduced inlining multi-thread producer commit tracking code. This was a critical bug for the multi-threaded producer scenario.
- Added new ProducerBarrier method for claiming a batch of sequences. This feature can give a significant throughput increase.
== 1.1.0
- Off by one regression bug in ProducerBarrier introduced in 1.0.9.
- Clarified the algorithm for initial cursor value in the ClaimStrategy.
== 1.0.9
- Added Apache 2.0 licence and comments.
- Small performance improvements to producers barriers and BatchConsumer.
== 1.0.8
- Bugfix for BatchConsumer sequence update when using SequenceTrackingHandler to ensure sequence is always updated at the end of a batch regardless.
== 1.0.7
- Factored out LifecycleAware interface to allowing consumers handlers to be notified when their thread starts and shuts down.
== 1.0.6
- Cache minimum consumer sequence in producer barriers. This helps make the performance more predictable on Nehalem processors and greater on earlier Core 2 processors.
== 1.0.5
- Removed Entry interface. All Entries must now extend AbstractEntry.
- Made setSequence package private on AbstractEntry for encapsulation.
================================================
FILE: src/docs/asciidoc/en/developer-guide/10_getting_and_building.adoc
================================================
= Getting & Building the Disruptor
:Author: LMAX Development Team
:Email:
:Date: {docdata}
A guide to checking out the code and building it
== Getting Started
1. Check out the project locally to your machine
+
--
[source,shell script]
----
$ git clone git://github.com/LMAX-Exchange/disruptor.git
$ cd disruptor
----
--
2. Build a distribution
+
--
[source,shell script]
----
$ ./gradlew clean build
----
As a result of the build you should find the following files:
- `disruptor/build/libs/disruptor-{VERSION_NUMBER}-SNAPSHOT.jar`
- `disruptor/build/libs/disruptor-{VERSION_NUMBER}-SNAPSHOT-javadoc.jar`
- `disruptor/build/libs/disruptor-{VERSION_NUMBER}-SNAPSHOT-sources.jar`
--
3. Run the tests
+
--
[source,shell script]
----
$ ./gradlew test
----
--
================================================
FILE: src/docs/asciidoc/en/developer-guide/20_performance_tests.adoc
================================================
= Disruptor Performance Tests
:Author: LMAX Development Team
:Email:
:Date: {docdata}
== Run the performance tests
When making changes to the Disruptor it is important to be aware of the performance impact of your change.
To measure the performance characteristics of the Disruptor there are many tests in the `perftest` and `jmh` sourcesets.
=== Running Perf Tests
The perf tests are all under `src/perftest` and are built using a custom framework.
To run them you need to fist build the perf jar and then run a single test at a time, for example:
[source,shell script]
----
$ ./gradlew perfJar
$ java -cp build/libs/disruptor-perf-*.jar com.lmax.disruptor.sequenced.OneToOneSequencedThroughputTest
----
=== Running JMH Tests
There are also https://github.com/openjdk/jmh/[JMH Benchmarks] for testing the performance of the Disruptor, these can be run with a gradle command
[source,shell script]
----
$ ./gradlew jmh
----
==== Isolated CPU benchmarking
Some JMH Benchmarks can be run on machines with isolated cpus to get results with less error.
Build the `jmhJar` on your development machine and transfer it to your benchmarking machine with isolated cpus:
[source,shell script]
----
dev-machine /path/to/disruptor $ ./gradlew jmhJar
dev-machine /path/to/disruptor $ scp dev-machine:build/lib/disruptor-*-jmh.jar bench-machine:
----
Assuming a system set up with isolated cores, e.g.
[source,shell script]
----
bench-machine ~ $ cat /proc/cmdline
... isolcpus=31,33,35,37,39,41,43,45,47,7,9,11,13,15,17,19,21,23 nohz_full=31,33,35,37,39,41,43,45,47,7,9,11,13,15,17,19,21,23 ...
----
And the system may have a `cpuset` setup to split application threads from sharing cpus with kernel code:
[source,shell script]
----
bench-machine ~ $ cat /cpusets/app/cpus
5,7-23,29,31-47
----
You can run the benchmarks taskset to some of those cpus so that Java threads (like GC and complication) run on some cores
and JMH Benchmark threads are pinned to isolated cpus using the following command (which is running just the one benchmark, `MultiProducersSequencerBenchmark`):
[source,shell script]
----
bench-machine ~ $ cat runBenchmarks.sh
#!/bin/bash
JAVA_HOME=/opt/jdk11/1.11.0.6_zulu11.37.17_ca-1
ISOLATED_CPUS=7,9,11,13,15,17,19,21,23 $JAVA_HOME/bin/java -jar ./disruptor-4.0.0-SNAPSHOT-jmh.jar -rf json -rff /tmp/jmh-result.json -foe true -v NORMAL -prof perf -jvmArgsPrepend -Xmx256m -jvmArgsPrepend -Xms256m -jvmArgsPrepend -XX:MaxDirectMemorySize=1g $@
bench-machine ~ $ sudo cset proc -v --exec app -- taskset -c 5,8,10,12,14,16,18,20,22,29,32,34,36,38,40,42,44,46 ./runBenchmarks.sh MultiProducersSequencerBenchmark
----
================================================
FILE: src/docs/asciidoc/en/developer-guide/25_jsctress_tests.adoc
================================================
= jcstress Tests
:Author: LMAX Development Team
:Email:
:Date: {docdata}
https://github.com/openjdk/jcstress/
> The Java Concurrency Stress (jcstress) is the experimental harness and a suite of tests to aid the research in the correctness of concurrency support in the JVM, class libraries, and hardware.
The Disruptor has some jcstress tests to experiment and validate the correctness of the concurrency promises that the
Disruptor makes.
== Running jcstress Tests
[source,shell script]
----
$ ./gradlew jcstress
----
================================================
FILE: src/docs/asciidoc/en/developer-guide/30_publishing_release.adoc
================================================
= Publishing Release
:Author: LMAX Development Team
:Email:
:Date: {docdata}
== Prerequisites
1. All tests should be completing successfully in CI and locally
2. The changelog is updated with relevant information
3. `build.gradle` has been updated with the version information for the proposed release, and pushed to GitHub
4. Create a new release via GitHub UI, this should tag the commit
== GPG Key
To sign the artifact, a requirement for public release, you must have a signing GPG key set up.
=== Creating a new GPG signing key
If you already have a GPG signing key, you can skip to the next section.
- If you are on version 2.1.17 or greater, run the command below to generate a GPG key pair:
+
--
[source,shell script]
----
$ gpg --full-generate-key
----
- At the prompt, specify the kind of key you want, or press Enter to accept the default `RSA and RSA`.
- Enter the desired key size. Your key must be at least 4096 bits.
- Enter the length of time the key should be valid. Press Enter to specify the default selection, indicating that the key doesn't expire.
--
- If you are not on version 2.1.17 or greater, the `gpg --full-generate-key` command doesn't work. Use the following command instead:
+
--
[source,shell script]
----
$ gpg --default-new-key-algo rsa4096 --gen-key
----
--
- Verify that your selections are correct.
- Enter your user ID information.
- Type a secure passphrase.
- (is using gpg >= 2.1) Export the keyring to a gpg file
+
--
[source,shell script]
----
gpg --keyring secring.gpg --export-secret-keys > ~/.gnupg/secring.gpg
----
--
=== Adding signing options for gradle
- `signing.keyId` is the last 8 characters of the public key id for the signing key, in this example, `2657EDD1`.
- `signing.password` is the passphrase for your keyring
- `signing.secretKeyRingFile` is the absolute path to the secret key ring file containing your private key
[source,shell script]
----
$ gpg --list-secret-keys --keyid-format SHORT
/home/dev/.gnupg/pubring.kbx
-----------------------------
sec rsa4096/2657EDD1 2021-12-31 [SC]
EA38CE5CFD74BBB831611491F9CE691A2657EDD1
uid [ultimate] LMAX Coders (LMAX Dev Team) <coders@lmax.com>
ssb rsa4096/F4831415 2021-12-31 [E]
$ cat gradle.properties
signing.keyId=2657EDD1
signing.password=<passphrase used to protect your private key>
signing.secretKeyRingFile=/home/dev/.gnupg/secring.gpg
----
See: https://docs.gradle.org/current/userguide/signing_plugin.html
=== Publish your public key
You need to publish your public key so that sonatype can verify who signed the release artifacts.
----
gpg --keyserver https://keyserver.ubuntu.com/ --send-keys 2657EDD1
----
Note: Other `keyservers` are available
== Release process
1. Clean any existing build data
+
--
[source,shell script]
----
$ ./gradlew clean
----
--
2. Add `gradle.properties` file in the root of the disruptor project with the following content
+
--
[source,shell script]
----
$ cat gradle.properties
sonatypeUsername=<username for sonatype>
sonatypePassword=<password for sonatype>
signing.keyId=<signing-key>
signing.password=<password>>
signing.secretKeyRingFile=/home/dev/.gnupg/secring.gpg
----
--
3. Build & upload to Sonatype
+
--
[source,shell script]
----
$ ./gradlew publish
----
*Note: Make sure the signing step was not skipped*
--
4. Release in to Sonatype
+
--
- Log in to https://oss.sonatype.org/
- Go to https://oss.sonatype.org/#stagingRepositories[Staging Repositories]
- Verify all the files are present and correct (including `*.asc` files generated by signing)
- Close the staging repository
- Release the repository
- Assuming all went well, wait to see changes at: https://repo1.maven.org/maven2/com/lmax/disruptor/
--
5. Remove `gradle.properties` file
+
--
This file is ignored from git, but I would not advise leaving it on disk long term as it has 2 passwords in plain text.
--
================================================
FILE: src/docs/asciidoc/en/developer-guide/90_tips.adoc
================================================
= Development tips
:Author: LMAX Development Team
:Email:
:Date: {docdata}
== Git Hooks
This project uses GitHub Actions for CI which runs the gradle build task to check the project can be built on each
commit/pull request.
So that you don't push changes that will fail the simple `test` & `check` steps we would suggest adding the git pre-commit
hook which will block any commit you try to do locally if the code fails these steps.
The git hook can be set up using the following gradle task:
[source,shell script]
----
$ ./gradlew setUpGitHooks
----
== Signed Commits
> Git is cryptographically secure, but it’s not foolproof. If you’re taking work from others on the internet and want to verify that commits are actually from a trusted source, Git has a few ways to sign and verify work using GPG.
- https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work
- https://docs.github.com/en/github/authenticating-to-github/signing-commits
================================================
FILE: src/docs/asciidoc/en/developer-guide/index.adoc
================================================
= LMAX Disruptor Developer Guide
:Author: LMAX Development Team
:Email:
:Date: {docdata}
:xrefstyle: short
LMAX welcomes outside contributions to the Disruptor. The following documentation should help you get checked out,
set up, and ready to start making changes to the codebase.
// Leave some gaps between these includes (trust me)
include::10_getting_and_building.adoc[leveloffset=+1]
include::20_performance_tests.adoc[leveloffset=+1]
include::25_jsctress_tests.adoc[leveloffset=+1]
include::30_publishing_release.adoc[leveloffset=+1]
include::90_tips.adoc[leveloffset=+1]
================================================
FILE: src/docs/asciidoc/en/disruptor.adoc
================================================
= LMAX Disruptor: High performance alternative to bounded queues for exchanging data between concurrent threads
Martin Thompson; Dave Farley; Michael Barker; Patricia Gee; Andrew Stewart
v1.0, May 2011
:sectnums:
:toc: left
:authors: Martin Thompson, Dave Farley, Michael Barker, Patricia Gee, Andrew Stewart
:email:
:date: 2011-05
:revnumber: 1.0
// If you're changing these, also check out asciidoctor.gradle!
:xrefstyle: short
:icons: font
:gradle-rootdir: ../../../../
:imagesdir: ../../
https://github.com/LMAX-Exchange/disruptor
.Abstract
[Abstract]
****
LMAX was established to create a very high performance financial exchange.
As part of our work to accomplish this goal we have evaluated several approaches to the design of such a system, but as we began to measure these we ran into some fundamental limits with conventional approaches.
Many applications depend on queues to exchange data between processing stages.
Our performance testing showed that the latency costs, when using queues in this way, were in the same order of magnitude as the cost of IO operations to disk (RAID or SSD based disk system) – dramatically slow.
If there are multiple queues in an end-to-end operation, this will add hundreds of microseconds to the overall latency.
There is clearly room for optimisation.
Further investigation and a focus on the computer science made us realise that the conflation of concerns inherent in conventional approaches, (e.g. queues and processing nodes) leads to contention in multi-threaded implementations, suggesting that there may be a better approach.
Thinking about how modern CPUs work, something we like to call "`mechanical sympathy`", using good design practices with a strong focus on teasing apart the concerns, we came up with a data structure and a pattern of use that we have called the Disruptor.
Testing has shown that the mean latency using the Disruptor for a three-stage pipeline is 3 orders of magnitude lower than an equivalent queue-based approach.
In addition, the Disruptor handles approximately 8 times more throughput for the same configuration.
These performance improvements represent a step change in the thinking around concurrent programming.
This new pattern is an ideal foundation for any asynchronous event processing architecture where high-throughput and low-latency is required.
At LMAX we have built an order matching engine, real-time risk management, and a highly available in-memory transaction processing system all on this pattern to great success.
Each of these systems has set new performance standards that, as far as we can tell, are unsurpassed.
However this is not a specialist solution that is only of relevance in the Finance industry.
The Disruptor is a general-purpose mechanism that solves a complex problem in concurrent programming in a way that maximizes performance, and that is simple to implement.
Although some of the concepts may seem unusual it has been our experience that systems built to this pattern are significantly simpler to implement than comparable mechanisms.
The Disruptor has significantly less write contention, a lower concurrency overhead and is more cache friendly than comparable approaches, all of which results in greater throughput with less jitter at lower latency.
On processors at moderate clock rates we have seen over 25 million messages per second and latencies lower than 50 nanoseconds.
This performance is a significant improvement compared to any other implementation that we have seen.
This is very close to the theoretical limit of a modern processor to exchange data between cores.
****
== Overview
The Disruptor is the result of our efforts to build the world’s highest performance financial exchange at LMAX.
Early designs focused on architectures derived from SEDA footnote:SEDA[Staged Event-Driven Architecture – https://en.wikipedia.org/wiki/Staged_event-driven_architecture] and Actors footnote:actors[Actor model – http://dspace.mit.edu/handle/1721.1/6952] using pipelines for throughput.
After profiling various implementations it became evident that the queuing of events between stages in the pipeline was dominating the costs.
We found that queues also introduced latency and high levels of jitter.
We expended significant effort on developing new queue implementations with better performance.
However it became evident that queues as a fundamental data structure are limited due to the conflation of design concerns for the producers, consumers, and their data storage.
The Disruptor is the result of our work to build a concurrent structure that cleanly separates these concerns.
== The Complexities of Concurrency
In the context of this document, and computer science in general, concurrency means not only that two or more tasks happen in parallel, but also that they contend on access to resources.
The contended resource may be a database, file, socket or even a location in memory.
Concurrent execution of code is about two things, mutual exclusion and visibility of change.
Mutual exclusion is about managing contended updates to some resource.
Visibility of change is about controlling when such changes are made visible to other threads.
It is possible to avoid the need for mutual exclusion if you can eliminate the need for contended updates.
If your algorithm can guarantee that any given resource is modified by only one thread, then mutual exclusion is unnecessary.
Read and write operations require that all changes are made visible to other threads.
However only contended write operations require the mutual exclusion of the changes.
The most costly operation in any concurrent environment is a contended write access.
To have multiple threads write to the same resource requires complex and expensive coordination.
Typically this is achieved by employing a locking strategy of some kind.
=== The Cost of Locks
Locks provide mutual exclusion and ensure that the visibility of change occurs in an ordered manner.
Locks are incredibly expensive because they require arbitration when contended.
This arbitration is achieved by a context switch to the operating system kernel which will suspend threads waiting on a lock until it is released.
During such a context switch, as well as releasing control to the operating system which may decide to do other house-keeping tasks while it has control, execution context can lose previously cached data and instructions.
This can have a serious performance impact on modern processors.
Fast user mode locks can be employed but these are only of any real benefit when not contended.
We will illustrate the cost of locks with a simple demonstration.
The focus of this experiment is to call a function which increments a 64-bit counter in a loop 500 million times.
This can be executed by a single thread on a 2.4Ghz Intel Westmere EP in just 300ms if written in Java.
The language is unimportant to this experiment and results will be similar across all languages with the same basic primitives.
Once a lock is introduced to provide mutual exclusion, even when the lock is as yet un-contended, the cost goes up significantly.
The cost increases again, by orders of magnitude, when two or more threads begin to contend.
The results of this simple experiment are shown in the table below:
.Comparative costs of contention
[cols2*,options="header"]
|===
| Method | Time (ms)
| Single thread
| 300
| Single thread with lock
| 10,000
| Two threads with lock
| 224,000
| Single thread with CAS
| 5,700
| Two threads with CAS
| 30,000
| Single thread with volatile write
| 4,700
|===
=== The Costs of "`CAS`"
A more efficient alternative to the use of locks can be employed for updating memory when the target of the update is a single word.
These alternatives are based upon the atomic, or interlocked, instructions implemented in modern processors.
These are commonly known as CAS (Compare And Swap) operations, e.g. "`lock cmpxchg`" on x86.
A CAS operation is a special machine-code instruction that allows a word in memory to be conditionally set as an atomic operation.
For the "`increment a counter experiment`" each thread can spin in a loop reading the counter then try to atomically set it to its new incremented value.
The old and new values are provided as parameters to this instruction.
If, when the operation is executed, the value of the counter matches the supplied expected value, the counter is updated with the new value.
If, on the other hand, the value is not as expected, the CAS operation will fail.
It is then up to the thread attempting to perform the change to retry, re-reading the counter incrementing from that value and so on until the change succeeds.
This CAS approach is significantly more efficient than locks because it does not require a context switch to the kernel for arbitration.
However CAS operations are not free of cost.
The processor must lock its instruction pipeline to ensure atomicity and employ a memory barrier to make the changes visible to other threads.
CAS operations are available in Java by using the `java.util.concurrent.Atomic*` classes.
If the critical section of the program is more complex than a simple increment of a counter it may take a complex state machine using multiple CAS operations to orchestrate the contention.
Developing concurrent programs using locks is difficult; developing lock-free algorithms using CAS operations and memory barriers is many times more complex and it is very difficult to prove that they are correct.
The ideal algorithm would be one with only a single thread owning all writes to a single resource with other threads reading the results.
To read the results in a multi-processor environment requires memory barriers to make the changes visible to threads running on other processors.
=== Memory Barriers
Modern processors perform out-of-order execution of instructions and out-of-order loads and stores of data between memory and execution units for performance reasons.
The processors need only guarantee that program logic produces the same results regardless of execution order.
This is not an issue for single-threaded programs.
However, when threads share state it is important that all memory changes appear in order, at the point required, for the data exchange to be successful.
Memory barriers are used by processors to indicate sections of code where the ordering of memory updates is important.
They are the means by which hardware ordering and visibility of change is achieved between threads.
Compilers can put in place complimentary software barriers to ensure the ordering of compiled code, such software memory barriers are in addition to the hardware barriers used by the processors themselves.
Modern CPUs are now much faster than the current generation of memory systems.
To bridge this divide CPUs use complex cache systems which are effectively fast hardware hash tables without chaining.
These caches are kept coherent with other processor cache systems via message passing protocols.
In addition, processors have "`store buffers`" to offload writes to these caches, and "`invalidate queues`" so that the cache coherency protocols can acknowledge invalidation messages quickly for efficiency when a write is about to happen.
What this means for data is that the latest version of any value could, at any stage after being written, be in a register, a store buffer, one of many layers of cache, or in main memory.
If threads are to share this value, it needs to be made visible in an ordered fashion and this is achieved through the coordinated exchange of cache coherency messages.
The timely generation of these messages can be controlled by memory barriers.
A read memory barrier orders load instructions on the CPU that executes it by marking a point in the invalidate queue for changes coming into its cache.
This gives it a consistent view of the world for write operations ordered before the read barrier.
A write barrier orders store instructions on the CPU that executes it by marking a point in the store buffer, thus flushing writes out via its cache.
This barrier gives an ordered view to the world of what store operations happen before the write barrier.
A full memory barrier orders both loads and stores but only on the CPU that executes it.
Some CPUs have more variants in addition to these three primitives but these three are sufficient to understand the complexities of what is involved.
In the Java memory model the read and write of a volatile field implements the read and write barriers respectively.
This was made explicit in the Java Memory Model footnote:jmm[Java Memory Model - https://jcp.org/en/jsr/detail?id=133] as defined with the release of Java 5.
=== Cache Lines
The way in which caching is used in modern processors is of immense importance to successful high performance operation.
Such processors are enormously efficient at churning through data and instructions held in cache and yet, comparatively, are massively inefficient when a cache miss occurs.
Our hardware does not move memory around in bytes or words.
For efficiency, caches are organised into cache-lines that are typically 32-256 bytes in size, the most common cache-line being 64 bytes.
This is the level of granularity at which cache coherency protocols operate.
This means that if two variables are in the same cache line, and they are written to by different threads, then they present the same problems of write contention as if they were a single variable.
This is a concept know as "`false sharing`".
For high performance then, it is important to ensure that independent, but concurrently written, variables do not share the same cache-line if contention is to be minimised.
When accessing memory in a predictable manner CPUs are able to hide the latency cost of accessing main memory by predicting which memory is likely to be accessed next and pre-fetching it into the cache in the background.
This only works if the processors can detect a pattern of access such as walking memory with a predictable "`stride`".
When iterating over the contents of an array the stride is predictable and so memory will be pre-fetched in cache lines, maximizing the efficiency of the access.
Strides typically have to be less than 2048 bytes in either direction to be noticed by the processor.
However, data structures like linked lists and trees tend to have nodes that are more widely distributed in memory with no predictable stride of access.
The lack of a consistent pattern in memory constrains the ability of the system to pre-fetch cache-lines, resulting in main memory accesses which can be more than 2 orders of magnitude less efficient.
=== The Problems of Queues
Queues typically use either linked-lists or arrays for the underlying storage of elements.
If an in-memory queue is allowed to be unbounded then for many classes of problem it can grow unchecked until it reaches the point of catastrophic failure by exhausting memory.
This happens when producers outpace the consumers.
Unbounded queues can be useful in systems where the producers are guaranteed not to outpace the consumers and memory is a precious resource, but there is always a risk if this assumption doesn’t hold and queue grows without limit.
To avoid this catastrophic outcome, queues are commonly constrained in size (bounded).
Keeping a queue bounded requires that it is either array-backed or that the size is actively tracked.
Queue implementations tend to have write contention on the head, tail, and size variables.
When in use, queues are typically always close to full or close to empty due to the differences in pace between consumers and producers.
They very rarely operate in a balanced middle ground where the rate of production and consumption is evenly matched.
This propensity to be always full or always empty results in high levels of contention and/or expensive cache coherence.
The problem is that even when the head and tail mechanisms are separated using different concurrent objects such as locks or CAS variables, they generally occupy the same cache-line.
The concerns of managing producers claiming the head of a queue, consumers claiming the tail, and the storage of nodes in between make the designs of concurrent implementations very complex to manage beyond using a single large-grain lock on the queue.
Large grain locks on the whole queue for put and take operations are simple to implement but represent a significant bottleneck to throughput.
If the concurrent concerns are teased apart within the semantics of a queue then the implementations become very complex for anything other than a single producer – single consumer implementation.
In Java there is a further problem with the use of queues, as they are significant sources of garbage.
Firstly, objects have to be allocated and placed in the queue.
Secondly, if linked-list backed, objects have to be allocated representing the nodes of the list.
When no longer referenced, all these objects allocated to support the queue implementation need to be re-claimed.
=== Pipelines and Graphs
For many classes of problem it makes sense to wire together several processing stages into pipelines. Such pipelines often have parallel paths, being organised into graph-like topologies.
The links between each stage are often implemented by queues with each stage having its own thread.
This approach is not cheap - at each stage we have to incur the cost of en-queuing and de-queuing units of work.
The number of targets multiplies this cost when the path must fork, and incurs an inevitable cost of contention when it must re-join after such a fork.
It would be ideal if the graph of dependencies could be expressed without incurring the cost of putting the queues between stages.
== Design of the LMAX Disruptor
While trying to address the problems described above, a design emerged through a rigorous separation of the concerns that we saw as being conflated in queues.
This approach was combined with a focus on ensuring that any data should be owned by only one thread for write access, therefore eliminating write contention.
That design became known as the "`Disruptor`".
It was so named because it had elements of similarity for dealing with graphs of dependencies to the concept of "`Phasers`" footnote:phasers[Phasers - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/Phaser.html] in Java 7, introduced to support Fork-Join.
The LMAX disruptor is designed to address all of the issues outlined above in an attempt to maximize the efficiency of memory allocation, and operate in a cache-friendly manner so that it will perform optimally on modern hardware.
At the heart of the disruptor mechanism sits a pre-allocated bounded data structure in the form of a ring-buffer.
Data is added to the ring buffer through one or more producers and processed by one or more consumers.
=== Memory Allocation
All memory for the ring buffer is pre-allocated on start up.
A ring-buffer can store either an array of pointers to entries or an array of structures representing the entries.
The limitations of the Java language mean that entries are associated with the ring-buffer as pointers to objects.
Each of these entries is typically not the data being passed itself, but a container for it.
This pre-allocation of entries eliminates issues in languages that support garbage collection, since the entries will be re-used and live for the duration of the Disruptor instance.
The memory for these entries is allocated at the same time and it is highly likely that it will be laid out contiguously in main memory and so support cache striding.
There is a proposal by John Rose to introduce "`value types`" footnote:valuetypes[Value Types - https://blogs.oracle.com/jrose/tuples-in-the-vm] to the Java language which would allow arrays of tuples, like other languages such as C, and so ensure that memory would be allocated contiguously and avoid the pointer indirection.
Garbage collection can be problematic when developing low-latency systems in a managed runtime environment like Java.
The more memory that is allocated the greater the burden this puts on the garbage collector.
Garbage collectors work at their best when objects are either very short-lived or effectively immortal.
The pre-allocation of entries in the ring buffer means that it is immortal as far as garbage collector is concerned and so represents little burden.
Under heavy load queue-based systems can back up, which can lead to a reduction in the rate of processing, and results in the allocated objects surviving longer than they should, thus being promoted beyond the young generation with generational garbage collectors.
This has two implications: first, the objects have to be copied between generations which cause latency jitter; second, these objects have to be collected from the old generation which is typically a much more expensive operation and increases the likelihood of "`stop the world`" pauses that result when the fragmented memory space requires compaction.
In large memory heaps this can cause pauses of seconds per GB in duration.
=== Teasing Apart the Concerns
We saw the following concerns as being conflated in all queue implementations, to the extent that this collection of distinct behaviours tend to define the interfaces that queues implement:
1. Storage of items being exchanged
2. Coordination of producers claiming the next sequence for exchange
3. Coordination of consumers being notified that a new item is available
When designing a financial exchange in a language that uses garbage collection, too much memory allocation can be problematic.
So, as we have described linked-list backed queues are a not a good approach.
Garbage collection is minimized if the entire storage for the exchange of data between processing stages can be pre-allocated.
Further, if this allocation can be performed in a uniform chunk, then traversal of that data will be done in a manner that is very friendly to the caching strategies employed by modern processors.
A data-structure that meets this requirement is an array with all the slots pre-filled.
On creation of the ring buffer the Disruptor utilises the abstract factory pattern to pre-allocate the entries.
When an entry is claimed, a producer can copy its data into the pre-allocated structure.
On most processors there is a very high cost for the remainder calculation on the sequence number, which determines the slot in the ring.
This cost can be greatly reduced by making the ring size a power of 2.
A bit mask of size minus one can be used to perform the remainder operation efficiently.
As we described earlier bounded queues suffer from contention at the head and tail of the queue.
The ring buffer data structure is free from this contention and concurrency primitives because these concerns have been teased out into producer and consumer barriers through which the ring buffer must be accessed.
The logic for these barriers is described below.
In most common usages of the Disruptor there is usually only one producer.
Typical producers are file readers or network listeners. In cases where there is a single producer there is no contention on sequence/entry allocation.
In more unusual usages where there are multiple producers, producers will race one another to claim the next entry in the ring-buffer.
Contention on claiming the next available entry can be managed with a simple CAS operation on the sequence number for that slot.
Once a producer has copied the relevant data to the claimed entry it can make it public to consumers by committing the sequence.
This can be done without CAS by a simple busy spin until the other producers have reached this sequence in their own commit.
Then this producer can advance the cursor signifying the next available entry for consumption.
Producers can avoid wrapping the ring by tracking the sequence of consumers as a simple read operation before they write to the ring buffer.
Consumers wait for a sequence to become available in the ring buffer before they read the entry.
Various strategies can be employed while waiting.
If CPU resource is precious they can wait on a condition variable within a lock that gets signalled by the producers.
This obviously is a point of contention and only to be used when CPU resource is more important than latency or throughput.
The consumers can also loop checking the cursor which represents the currently available sequence in the ring buffer.
This could be done with or without a thread yield by trading CPU resource against latency.
This scales very well as we have broken the contended dependency between the producers and consumers if we do not use a lock and condition variable.
Lock free multi-producer – multi-consumer queues do exist but they require multiple CAS operations on the head, tail, size counters.
The Disruptor does not suffer this CAS contention.
=== Sequencing
Sequencing is the core concept to how the concurrency is managed in the Disruptor.
Each producer and consumer works off a strict sequencing concept for how it interacts with the ring buffer.
Producers claim the next slot in sequence when claiming an entry in the ring.
This sequence of the next available slot can be a simple counter in the case of only one producer or an atomic counter updated using CAS operations in the case of multiple producers.
Once a sequence value is claimed, this entry in the ring buffer is now available to be written to by the claiming producer.
When the producer has finished updating the entry it can commit the changes by updating a separate counter which represents the cursor on the ring buffer for the latest entry available to consumers.
The ring buffer cursor can be read and written in a busy spin by the producers using memory barrier without requiring a CAS operation as below.
[source,java]
----
long expectedSequence = claimedSequence – 1;
while (cursor != expectedSequence)
{
// busy spin
}
cursor = claimedSequence;
----
Consumers wait for a given sequence to become available by using a memory barrier to read the cursor.
Once the cursor has been updated the memory barriers ensure the changes to the entries in the ring buffer are visible to the consumers who have waited on the cursor advancing.
Consumers each contain their own sequence which they update as they process entries from the ring buffer.
These consumer sequences allow the producers to track consumers to prevent the ring from wrapping.
Consumer sequences also allow consumers to coordinate work on the same entry in an ordered manner
In the case of having only one producer, and regardless of the complexity of the consumer graph, no locks or CAS operations are required.
The whole concurrency coordination can be achieved with just memory barriers on the discussed sequences.
=== Batching Effect
When consumers are waiting on an advancing cursor sequence in the ring buffer an interesting opportunity arises that is not possible with queues.
If the consumer finds the ring buffer cursor has advanced a number of steps since it last checked it can process up to that sequence without getting involved in the concurrency mechanisms.
This results in the lagging consumer quickly regaining pace with the producers when the producers burst ahead thus balancing the system.
This type of batching increases throughput while reducing and smoothing latency at the same time.
Based on our observations, this effect results in a close to constant time for latency regardless of load, up until the memory sub-system is saturated, and then the profile is linear following Little’s Law footnote:littleslaw[Little’s Law - https://en.wikipedia.org/wiki/Little%27s_law].
This is very different to the "`J`" curve effect on latency we have observed with queues as load increases.
=== Dependency Graphs
A queue represents the simple one step pipeline dependency between producers and consumers.
If the consumers form a chain or graph-like structure of dependencies then queues are required between each stage of the graph.
This incurs the fixed costs of queues many times within the graph of dependent stages.
When designing the LMAX financial exchange our profiling showed that taking a queue based approach resulted in queuing costs dominating the total execution costs for processing a transaction.
Because the producer and consumer concerns are separated with the Disruptor pattern, it is possible to represent a complex graph of dependencies between consumers while only using a single ring buffer at the core.
This results in greatly reduced fixed costs of execution thus increasing throughput while reducing latency.
A single ring buffer can be used to store entries with a complex structure representing the whole workflow in a cohesive place.
Care must be taken in the design of such a structure so that the state written by independent consumers does not result in false sharing of cache lines.
=== Disruptor Class Diagram
The core relationships in the Disruptor framework are depicted in the class diagram below.
This diagram leaves out the convenience classes which can be used to simplify the programming model.
After the dependency graph is constructed the programming model is simple.
Producers claim entries in sequence via a `ProducerBarrier`, write their changes into the claimed entry, then commit that entry back via the `ProducerBarrier` making them available for consumption.
As a consumer all one needs do is provide a `BatchHandler` implementation that receives call backs when a new entry is available.
This resulting programming model is event based having a lot of similarities to the Actor Model.
Separating the concerns normally conflated in queue implementations allows for a more flexible design.
A `RingBuffer` exists at the core of the Disruptor pattern providing storage for data exchange without contention.
The concurrency concerns are separated out for the producers and consumers interacting with the `RingBuffer`.
The `ProducerBarrier` manages any concurrency concerns associated with claiming slots in the ring buffer, while tracking dependant consumers to prevent the ring from wrapping.
The `ConsumerBarrier` notifies consumers when new entries are available, and Consumers can be constructed into a graph of dependencies representing multiple stages in a processing pipeline.
image::./resources/images/classdiagram.png[]
=== Code Example
The code below is an example of a single producer and single consumer using the convenience interface `BatchHandler` for implementing a consumer.
The consumer runs on a separate thread receiving entries as they become available.
[source,java]
----
// Callback handler which can be implemented by consumers
final BatchHandler<ValueEntry> batchHandler = new BatchHandler<ValueEntry>()
{
public void onAvailable(final ValueEntry entry) throws Exception
{
// process a new entry as it becomes available.
}
public void onEndOfBatch() throws Exception
{
// useful for flushing results to an IO device if necessary.
}
public void onCompletion()
{
// do any necessary clean up before shutdown
}
};
RingBuffer<ValueEntry> ringBuffer =
new RingBuffer<ValueEntry>(ValueEntry.ENTRY_FACTORY, SIZE,
ClaimStrategy.Option.SINGLE_THREADED,
WaitStrategy.Option.YIELDING);
ConsumerBarrier<ValueEntry> consumerBarrier = ringBuffer.createConsumerBarrier();
BatchConsumer<ValueEntry> batchConsumer =
new BatchConsumer<ValueEntry>(consumerBarrier, batchHandler);
ProducerBarrier<ValueEntry> producerBarrier = ringBuffer.createProducerBarrier(batchConsumer);
// Each consumer can run on a separate thread
EXECUTOR.submit(batchConsumer);
// Producers claim entries in sequence
ValueEntry entry = producerBarrier.nextEntry();
// copy data into the entry container
// make the entry available to consumers
producerBarrier.commit(entry);
----
== Throughput Performance Testing
As a reference we choose Doug Lea’s excellent ``java.util.concurrent.ArrayBlockingQueue``footnote:arrayblockingqueue[ArrayBlockingQueue - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ArrayBlockingQueue.html] which has the highest performance of any bounded queue based on our testing.
The tests are conducted in a blocking programming style to match that of the Disruptor.
The tests cases detailed below are available in the Disruptor open source project.
WARNING: running the tests requires a system capable of executing at least 4 threads in parallel.
.Unicast: 1P – 1C
image::./resources/images/unicast1p1c.png[]
.Three Step Pipeline: 1P – 3C
image::./resources/images/threestep1p3c.png[]
.Sequencer: 3P – 1C
image::./resources/images/sequencer3p1c.png[]
.Multicast: 1P – 3C
image::./resources/images/multicast1p3c.png[]
.Diamond: 1P – 3C
image::./resources/images/diamond1p3c.png[]
For the above configurations an `ArrayBlockingQueue` was applied for each arc of data flow compared to barrier configuration with the Disruptor.
The following table shows the performance results in operations per second using a Java 1.6.0_25 64-bit Sun JVM, Windows 7, Intel Core i7 860 @ 2.8 GHz without HT and Intel Core i7-2720QM, Ubuntu 11.04, and taking the best of 3 runs when processing 500 million messages.
Results can vary substantially across different JVM executions and the figures below are not the highest we have observed.
.Comparative throughput (in ops per sec)
[cols=5*,options="header"]
|===
|
2+| Nehalem 2.8Ghz – Windows 7 SP1 64-bit
2+| Sandy Bridge 2.2Ghz – Linux 2.6.38 64-bit
|
h| ABQ
h| Disruptor
h| ABQ
h| Disruptor
| Unicast: 1P – 1C
| 5,339,256
| 25,998,336
| 4,057,453
| 22,381,378
| Pipeline: 1P – 3C
| 2,128,918
| 16,806,157
| 2,006,903
| 15,857,913
| Sequencer: 3P – 1C
| 5,539,531
| 13,403,268
| 2,056,118
| 14,540,519
| Multicast: 1P – 3C
| 1,077,384
| 9,377,871
| 260,733
| 10,860,121
| Diamond: 1P – 3C
| 2,113,941
| 16,143,613
| 2,082,725
| 15,295,197
|===
.Comparative throughput updated for modern hardware (in ops per sec)
[cols=4*,options="header"]
|===
|
3+| AMD EPYC 9374F – Linux 5.4.277 – OpenJDK 11.0.24
|
h| ABQ
h| Disruptor 3
h| Disruptor 4
| Unicast: 1P – 1C
| 20,895,148
| 134,553,283
| 160,359,204
| Pipeline: 1P – 3C
| 5,216,647
| 76,068,766
| 101,317,122
| Sequencer: 3P – 1C
| 18,791,340
| 16,010,759
| 29,726,516
| Multicast: 1P – 3C
| 2,355,379
| 68,157,033
| 70,018,204
| Diamond: 1P – 3C
| 3,433,665
| 61,229,488
| 63,123,343
|===
== Latency Performance Testing
To measure latency we take the three stage pipeline and generate events at less than saturation.
This is achieved by waiting 1 microsecond after injecting an event before injecting the next and repeating 50 million times.
To time at this level of precision it is necessary to use time stamp counters from the CPU.
We chose CPUs with an invariant TSC because older processors suffer from changing frequency due to power saving and sleep states.
Intel Nehalem and later processors use an invariant TSC which can be accessed by the latest Oracle JVMs running on Ubuntu 11.04.
No CPU binding has been employed for this test.
For comparison we use the ArrayBlockingQueue once again.
We could have used ConcurrentLinkedQueue footnote:CLQ[ConcurrentLinkedQueue - http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ConcurrentLinkedQueue.html] which is likely to give better results but we want to use a bounded queue implementation to ensure producers do not outpace consumers by creating back pressure.
The results below are for 2.2Ghz Core i7-2720QM running Java 1.6.0_25 64-bit on Ubuntu 11.04.
Mean latency per hop for the Disruptor comes out at 52 nanoseconds compared to 32,757 nanoseconds for ArrayBlockingQueue.
Profiling shows the use of locks and signalling via a condition variable are the main cause of latency for the ArrayBlockingQueue.
.Comparative Latency in three stage pipeline
[cols=3*,options="header"]
|===
| | Array Blocking Queue (ns) | Disruptor (ns)
| Min Latency
| 145
| 29
| Mean Latency
| 32,757
| 52
| 99% observations less than
| 2,097,152
| 128
| 99.99% observations less than
| 4,194,304
| 8,192
| Max Latency
| 5,069,086
| 175,567
|===
== Conclusion
The Disruptor is a major step forward for increasing throughput, reducing latency between concurrent execution contexts and ensuring predictable latency, an important consideration in many applications.
Our testing shows that it out-performs comparable approaches for exchanging data between threads.
We believe that this is the highest performance mechanism for such data exchange.
By concentrating on a clean separation of the concerns involved in cross-thread data exchange, by eliminating write contention, minimizing read contention and ensuring that the code worked well with the caching employed by modern processors, we have created a highly efficient mechanism for exchanging data between threads in any application.
The batching effect that allows consumers to process entries up to a given threshold, without any contention, introduces a new characteristic in high performance systems.
For most systems, as load and contention increase there is an exponential increase in latency, the characteristic "`J`" curve.
As load increases on the Disruptor, latency remains almost flat until saturation occurs of the memory sub-system.
We believe that the Disruptor establishes a new benchmark for high-performance computing and is very well placed to continue to take advantage of current trends in processor and computer design.
View the original PDF of this paper link:./files/Disruptor-1.0.pdf[here].
================================================
FILE: src/docs/asciidoc/en/index.adoc
================================================
= LMAX Disruptor
High Performance Inter-Thread Messaging Library
:Author: LMAX Development Team
:Email:
:Date: {docdata}
// If you're changing these, also check out asciidoctor.gradle!
:xrefstyle: short
:icons: font
:gradle-rootdir: ../../../../
:imagesdir: ../../
== Read This First
To understand the problem the Disruptor is trying to solve, and to get a feel for why this concurrency framework is so fast, read the <<disruptor.adoc#,Technical Paper>>.
It also contains detailed performance results.
And now for some words from our sponsors...
LMAX are recruiting once again.
If you are interested in working with a great team, with some amazing technology, and think you can add something to the mix then please check out our https://careers.lmax.com/[jobs page].
== What is the Disruptor?
https://www.lmax.com[LMAX] aims to be the fastest trading platform in the world.
Clearly, in order to achieve this we needed to do something special to achieve very low-latency and high-throughput with our Java platform.
Performance testing showed that using queues to pass data between stages of the system was introducing latency, so we focused on optimising this area.
The Disruptor is the result of our research and testing.
We found that cache misses at the CPU-level, and locks requiring kernel arbitration are both extremely costly, so we created a framework which has "mechanical sympathy" for the hardware it's running on, and that's lock-free.
This is not a specialist solution, it's not designed to work only for a financial application.
The Disruptor is a general-purpose mechanism for solving a difficult problem in concurrent programming.
It works in a different way to more conventional approaches, so you use it a little differently than you might be used to.
For example, applying the pattern to your system is not as simple as replacing all your queues with the https://trishagee.com/2011/06/22/dissecting_the_disruptor_whats_so_special_about_a_ring_buffer/[magic ring buffer].
We've got:
- a <<user-guide/index.adoc#,User Guide>> to guide you,
- a growing number of https://github.com/LMAX-Exchange/disruptor/wiki/Blogs-And-Articles[blogs and articles] giving an overview of how it works,
- the <<disruptor.adoc#,technical paper>> goes into some detail as you'd expect,
- and the performance tests give examples of how to use the Disruptor.
If you prefer real, live people explaining things instead of a dry paper or content-heavy website, there's always the https://www.infoq.com/presentations/LMAX/[presentation Mike and Martin gave] at QCon San Francisco.
If you fancy a natter with the folks involved head over to our https://groups.google.com/g/lmax-disruptor[Discussion Group].
Martin Thompson will also witter on occasionally about performance in his https://mechanical-sympathy.blogspot.com/[Mechanical Sympathy blog].
Martin Fowler has also done a great https://martinfowler.com/articles/lmax.html[review] of the Disruptor's application at LMAX.
== What's the big deal?
It's fast.
Very fast.
.Latency histogram comparing Disruptor to ArrayBlockingQueue
image::resources/images/latency-histogram.png[]
Note that this is a log-log scale, not linear.
If we tried to plot the comparisons on a linear scale, we'd run out of space very quickly.
We have performance results of the test that produced these results, plus others of throughput testing.
== Great What do I do next?
- Read the <<user-guide/index.adoc#,User Guide>>,
- Read the <<./javadoc/index#,API documentation>>,
- Check out our https://github.com/LMAX-Exchange/disruptor/wiki/Frequently-Asked-Questions[Frequently Asked Questions]
- Want to work on the Disruptor? Read the <<developer-guide/index.adoc#,Developer Guide>>,
== Discussion, Blogs & Other Useful Links
- https://groups.google.com/g/lmax-disruptor[Disruptor Google Group]
- <<disruptor.adoc#,Disruptor Paper>>
- https://martinfowler.com/articles/lmax.html[Martin Fowler's Technical Review]
- https://github.com/disruptor-net/Disruptor-net[.NET Disruptor Port]
- https://www.lmax.com[LMAX Exchange]
- https://www.lmax.com/blog/staff-blogs/[LMAX Staff Blogs]
- https://mechanical-sympathy.blogspot.com/[Mechanical Sympathy] (Martin Thompson)
- https://bad-concurrency.blogspot.com/[Bad Concurrency] (Michael Barker)
== Presentations
- https://www.infoq.com/presentations/LMAX/[Disruptor presentation @ QCon SF]
- https://www.slideshare.net/trishagee/introduction-to-the-disruptor[Introduction to the Disruptor]
== Changelog
The changelog can be <<changelog.adoc#,found here>>.
================================================
FILE: src/docs/asciidoc/en/user-guide/10_using_the_disruptor.adoc
================================================
= Using the Disruptor
:Author: LMAX Development Team
:Email:
:Date: {docdata}
// If you're changing these, also check out asciidoctor.gradle!
:xrefstyle: short
:icons: font
:gradle-rootdir: ../../../../../
:imagesdir: ../../
== Introduction
The Disruptor is a library that provides a concurrent ring buffer data structure.
It is designed to provide a low-latency, high-throughput work queue in asynchronous event processing architectures.
To understand the benefits of the Disruptor we can compare it to something well understood and quite similar in purpose.
In the case of the Disruptor this would be Java's `BlockingQueue`.
Like a queue the purpose of the Disruptor is to move data (e.g. messages or events) between threads within the same process.
However, there are some key features that the Disruptor provides that distinguish it from a queue.
They are:
- Multicast events to consumers, with <<_consumer_dependency_graph,consumer dependency graph>>.
- <<_event_pre_allocation, Pre-allocate memory>> for events.
- <<_optionally_lock_free, Optionally lock-free>>.
=== Core Concepts
Before we can understand how the Disruptor works, it is worthwhile defining a number of terms that will be used throughout the documentation and the code.
For those with a DDD bent, think of this as the ubiquitous language of the Disruptor domain.
- **Ring Buffer**: The Ring Buffer is often considered the main aspect of the Disruptor.
However, from 3.0 onwards, the Ring Buffer is only responsible for the storing and updating of the data (``Event``s) that move through the Disruptor.
For some advanced use cases, it can even be completely replaced by the user.
- *Sequence*: The Disruptor uses ``Sequence``s as a means to identify where a particular component is up to.
Each consumer (Event Processor) maintains a `Sequence` as does the Disruptor itself.
The majority of the concurrent code relies on the movement of these Sequence values, hence the `Sequence` supports many of the current features of an `AtomicLong`.
In fact the only real difference between the two is that the `Sequence` contains additional functionality to prevent false sharing between ``Sequence``s and other values.
- *Sequencer*: The Sequencer is the real core of the Disruptor.
The two implementations (single producer, multi producer) of this interface implement all the concurrent algorithms for fast, correct passing of data between producers and consumers.
- *Sequence Barrier*: The Sequencer produces a Sequence Barrier that contains references to the main published `Sequence` from the Sequencer and the ``Sequence``s of any dependent consumer.
It contains the logic to determine if there are any events available for the consumer to process.
- *Wait Strategy*: The Wait Strategy determines how a consumer will wait for events to be placed into the Disruptor by a producer.
More details are available in the section about being optionally lock-free.
- *`Event`*: The unit of data passed from producer to consumer.
There is no specific code representation of the Event as it defined entirely by the user.
- *Event Processor*: The main event loop for handling events from the Disruptor and has ownership of consumer's Sequence.
There is a single representation called BatchEventProcessor that contains an efficient implementation of the event loop and will call back onto a user supplied implementation of the EventHandler interface.
- *Event Handler*: An interface that is implemented by the user and represents a consumer for the Disruptor.
- *Producer*: This is the user code that calls the Disruptor to enqueue ``Event``s.
This concept also has no representation in the code.
To put these elements into context, below is an example of how LMAX uses the Disruptor within its high performance core services, e.g. the exchange.
[#user-guide-models]
.Disruptor with a set of dependent consumers.
image::../resources/images/user-guide/models.png[]
=== Multicast Events
This is the biggest behavioural difference between queues and the Disruptor.
When you have multiple consumers listening on the same Disruptor, it publishes all events to all consumers.
In contrast, a queue will only send a single event to a single consumer.
You can use this behaviour of the Disruptor when you need to independent multiple parallel operations on the same data.
.Example use-case
[example]
****
The canonical example from LMAX is where we have three operations:
- journalling (writing the input data to a persistent journal file);
- replication (sending the input data to another machine to ensure that there is a remote copy of the data);
- and business logic (the real processing work).
Looking at <<user-guide-models>> is possible to see that there are 3 ``EventHandler``s listening (`JournalConsumer`, `ReplicationConsumer` and `ApplicationConsumer`) to the Disruptor.
Each of these Event Handlers will receive *all* the messages available in the Disruptor (in the same order).
This allows for work for each of these consumers to operate in parallel.
****
[#_consumer_dependency_graph]
=== Consumer Dependency Graph
To support real world applications of the parallel processing behaviour it was necessary to support co-ordination between the consumers.
Referring back to the example described above, it is necessary to prevent the business logic consumer from making progress until the journalling and replication consumers have completed their tasks.
We call this concept "`gating`" (or, more correctly, the feature is a form of "`gating`").
"`Gating`" happens in two places:
- Firstly we need to ensure that the producers do not overrun consumers.
This is handled by adding the relevant consumers to the Disruptor by calling `RingBuffer.addGatingConsumers()`.
- Secondly, the case referred to previously is implemented by constructing a SequenceBarrier containing Sequences from the components that must complete their processing first.
Referring to <<user-guide-models>> there are 3 consumers listening for Events from the Ring Buffer.
There is a dependency graph in this example.
The ApplicationConsumer depends on the `JournalConsumer` and `ReplicationConsumer`.
This means that the `JournalConsumer` and `ReplicationConsumer` can run freely in parallel with each other.
The dependency relationship can be seen by the connection from the ``ApplicationConsumer``'s `SequenceBarrier` to the ``Sequence``s of the `JournalConsumer` and `ReplicationConsumer`.
It is also worth noting the relationship that the `Sequencer` has with the downstream consumers.
One of its roles is to ensure that publication does not wrap the Ring Buffer.
To do this none of the downstream consumer may have a `Sequence` that is lower than the Ring Buffer's `Sequence` less the size of the Ring Buffer.
However, by using the graph of dependencies an interesting optimisation can be made.
Because the ``ApplicationConsumer``'s Sequence is guaranteed to be less than or equal to that of the `JournalConsumer` and `ReplicationConsumer` (that is what that dependency relationship ensures) the `Sequencer` need only look at the Sequence of the `ApplicationConsumer`.
In a more general sense the `Sequencer` only needs to be aware of the ``Sequence``s of the consumers that are the leaf nodes in the dependency tree.
[#_event_pre_allocation]
=== Event Pre-allocation
One of the goals of the Disruptor is to enable use within a low latency environment.
Within low-latency systems it is necessary to reduce or remove memory allocations.
In Java-based system the purpose is to reduce the number stalls due to garbage collection footnote:low-latency[in low-latency C/C++ systems,heavy memory allocation is also problematic due to the contention that be placed on the memory allocator].
To support this the user is able to preallocate the storage required for the events within the Disruptor.
During construction and `EventFactory` is supplied by the user and will be called for each entry in the Disruptor's Ring Buffer.
When publishing new data to the Disruptor the API will allow the user to get hold of the constructed object so that they can call methods or update fields on that store object.
The Disruptor provides guarantees that these operations will be concurrency-safe as long as they are implemented correctly.
[#_optionally_lock_free]
=== Optionally Lock-free
Another key implementation detail pushed by the desire for low-latency is the extensive use of lock-free algorithms to implement the Disruptor.
All memory visibility and correctness guarantees are implemented using memory barriers and/or compare-and-swap operations.
[CAUTION]
--
There is only one use-case where an actual lock is required and that is within the `BlockingWaitStrategy`.
This is done solely for the purpose of using a *condition* so that a consuming thread can be parked while waiting for new events to arrive.
Many low-latency systems will use a busy-wait to avoid the jitter that can be incurred by using a *condition*; however, in number of system busy-wait operations can lead to significant degradation in performance, especially where the CPU resources are heavily constrained, e.g. web servers in virtualised-environments.
--
== Getting Started
=== Getting the Disruptor
The Disruptor jar file is available from https://search.maven.org/artifact/com.lmax/disruptor[Maven Central] and can be integrated into your dependency manager of choice from there.
=== Basic Produce and Consume
To get started with the Disruptor we are going to consider very simple and contrived example.
We will pass a single `long` value from a producer to a consumer, and the consumer will simply print out the value.
There are currently several styles of writing publishers and consumers for the Disruptor.
Whilst they are all fundamentally similar, there may be slight nuances in each approach that will be covered below.
Firstly we will define the `Event` that will carry the data and is common to all following examples:
.Example `LongEvent`
[source,java]
----
include::{gradle-rootdir}/src/examples/java/com/lmax/disruptor/examples/longevent/LongEvent.java[tag=example]
----
In order to allow the Disruptor to preallocate these events for us, we need to an `EventFactory` that will perform the construction.
This could be a method reference, such as `LongEvent::new` or an explicit implementation of the `EventFactory` interface:
.Example `LongEventFactory`
[source,java]
----
include::{gradle-rootdir}/src/examples/java/com/lmax/disruptor/examples/longevent/LongEventFactory.java[tag=example]
----
Once we have the event defined, we need to create a consumer that will handle these events.
As an example, we will create an `EventHandler` that will print the value out to the console.
.Example `LongEventHandler`
[source,java]
----
include::{gradle-rootdir}/src/examples/java/com/lmax/disruptor/examples/longevent/LongEventHandler.java[tag=example]
----
Finally, we will need a source for these events.
For simplicity, we will assume that the data is coming from some sort of I/O device, e.g. network or file in the form of a `ByteBuffer`.
==== Publishing
[[publishing-using-lambdas]]
===== Using Lambdas
Since version 3.0 of the Disruptor it has been possible to use a Lambda-style API to write publishers.
This is the preferred approach, as it encapsulates much of the complexity of the alternatives.
.Publishing events using lambdas
[source,java]
----
include::{gradle-rootdir}/src/examples/java/com/lmax/disruptor/examples/longevent/lambdas/LongEventMain.java[tag=example]
----
<1> Specify the size of the ring buffer, must be power of 2.
<2> Construct the Disruptor
<3> Connect the handler
<4> Start the Disruptor, starts all threads running
<5> Get the ring buffer from the Disruptor to be used for publishing.
[WARNING]
--
Notice that the lambda used for `publishEvent()` only refers to the parameters that are passed in.
If we were to instead write that code as:
.Example of a capturing lambda
[source,java]
----
ByteBuffer bb = ByteBuffer.allocate(8);
for (long l = 0; true; l++)
{
bb.putLong(0, l);
ringBuffer.publishEvent((event, sequence) -> event.set(bb.getLong(0)));
Thread.sleep(1000);
}
----
This would create a capturing lambda, meaning that it would need to instantiate an object to hold the `ByteBuffer bb` variable as it passes the lambda through to the `publishEvent()` call.
This will create additional (unnecessary) garbage, so the call that passes the argument through to the lambda should be preferred if low GC pressure is a requirement.
--
Given that method references can be used instead of anonymous lambdas, it is possible to rewrite the example in this fashion:
.Example using method references
[source,java]
----
include::{gradle-rootdir}/src/examples/java/com/lmax/disruptor/examples/longevent/methodrefs/LongEventMain.java[tag=example]
----
===== Using Translators
Prior to version 3.0, the preferred way of publishing messages was via the Event Publisher/Event Translator interfaces:
.Example `LongEventProducer`
[source,java]
----
include::{gradle-rootdir}/src/examples/java/com/lmax/disruptor/examples/longevent/LongEventProducer.java[tag=example]
----
This approach uses number of extra classes (e.g. handler, translator) that are not explicitly required when using lambdas.
The advantage of here is that the translator code can be pulled into a separate class and easily unit tested.
The Disruptor provides a number of different interfaces (`EventTranslator`, `EventTranslatorOneArg`, `EventTranslatorTwoArg`, etc.) that can be implemented to provide translators.
This is to allow for the translators to be represented as static classes and lambdas (see <<publishing-using-lambdas,above>>).
The arguments to the translation method are passed through the call on the Ring Buffer through to the translator.
==== Publishing Using the Legacy API
There is a more "raw" approach that we can use:
.Example Legacy `LongEventProducer`
[source,java]
----
include::{gradle-rootdir}/src/examples/java/com/lmax/disruptor/examples/longevent/legacy/LongEventProducer.java[tag=example]
----
<1> Grab the next sequence
<2> Get the entry in the Disruptor for that sequence
<3> Fill the entry with data
What becomes immediately obvious is that event publication becomes more involved than using a simple queue.
This is due to the desire for Event pre-allocation.
It requires (at the lowest level) a 2-phase approach to message publication, i.e. claim the slot in the ring buffer and then publish the available data.
[CAUTION]
--
It is also necessary to wrap publication in a `try`/`finally` block.
If we claim a slot in the Ring Buffer (calling ``RingBuffer#next()``) then we must publish this sequence.
Failing to do so can result in corruption of the state of the Disruptor.
Specifically, in the multi-producer case, this will result in the consumers stalling and being unable to recover without a restart.
Therefore, it is recommended that either the lambda or `EventTranslator` APIs be used.
--
The final step is to wire the whole thing together.
Whilst it is possible to wire up each component manually, this can be complicated and so a DSL is provided to simplify construction.
TIP: Some of the more complicated options are not available via the DSL; however, it is suitable for most circumstances.
.Example using the legacy `LongEventProducer`
[source,java]
----
include::{gradle-rootdir}/src/examples/java/com/lmax/disruptor/examples/longevent/legacy/LongEventMain.java[tag=example]
----
=== Basic Tuning Options
Using the above approach will work functionally in the widest set of deployment scenarios.
However, there are a number of tuning options that can be used to improve performance.
The two main options for tuning are:
- <<_single_vs_multiple_producers, Single vs. multiple producers>>, _and_
- <<_alternative_wait_strategies, Alternative wait strategies>>.
Both of these options are set when constructing a Disruptor:
.Tuning the Disruptor
[source,java]
----
public class LongEventMain
{
public static void main(final String[] args)
{
//.....
Disruptor<LongEvent> disruptor = new Disruptor(
factory,
bufferSize,
DaemonThreadFactory.INSTANCE,
ProducerType.SINGLE, // <1>
new BlockingWaitStrategy() // <2>
);
//.....
}
}
----
<1> Use `ProducerType#SINGLE` to create a `SingleProducerSequencer`; use `ProducerType#MULTI` to create a `MultiProducerSequence`
<2> Set the desired `WaitStrategy`
[#_single_vs_multiple_producers]
==== Single vs. Multiple Producers
One of the best ways to improve performance in concurrent systems is to adhere to the https://mechanical-sympathy.blogspot.com/2011/09/single-writer-principle.html[Single Writer Principle], this applies to the Disruptor.
If you are in the situation where there will only ever be a single thread producing events into the Disruptor, then you can take advantage of this to gain additional performance.
To give an indication of how much of a performance advantage can be achieved through this technique we can change the producer type in the OneToOne performance test.
Tests run on i7 Sandy Bridge MacBook Air.
.Multiple Producer
[%autowidth]
|===
| Run 0 | Disruptor=26,553,372 ops/sec
| Run 1 | Disruptor=28,727,377 ops/sec
| Run 2 | Disruptor=29,806,259 ops/sec
| Run 3 | Disruptor=29,717,682 ops/sec
| Run 4 | Disruptor=28,818,443 ops/sec
| Run 5 | Disruptor=29,103,608 ops/sec
| Run 6 | Disruptor=29,239,766 ops/sec
|===
.Single Producer
[%autowidth]
|===
| Run 0 | Disruptor=89,365,504 ops/sec
| Run 1 | Disruptor=77,579,519 ops/sec
| Run 2 | Disruptor=78,678,206 ops/sec
| Run 3 | Disruptor=80,840,743 ops/sec
| Run 4 | Disruptor=81,037,277 ops/sec
| Run 5 | Disruptor=81,168,831 ops/sec
| Run 6 | Disruptor=81,699,346 ops/sec
|===
[#_alternative_wait_strategies]
==== Alternative Wait Strategies
The default `WaitStrategy` used by the Disruptor is the `BlockingWaitStrategy`.
Internally the `BlockingWaitStrategy` uses a typical lock and condition variable to handle thread wake-up.
The `BlockingWaitStrategy` is the slowest of the available wait strategies, but is the most conservative with the respect to CPU usage and will give the most consistent behaviour across the widest variety of deployment options.
Knowledge of the deployed system can allow for additional performance by choosing a more appropriate wait strategy:
- **SleepingWaitStrategy** ->
--
Like the `BlockingWaitStrategy` the `SleepingWaitStrategy` it attempts to be conservative with CPU usage by using a simple busy wait loop.
The difference is that the `SleepingWaitStrategy` uses a call to link:https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/locks/LockSupport.html#parkNanos(long)[`LockSupport.parkNanos(1)`^] in the middle of the loop.
On a typical Linux system this will pause the thread for around 60µs.
This has the benefits that the producing thread does not need to take any action other increment the appropriate counter and that it does not require the cost of signalling a condition variable.
However, the mean latency of moving the event between the producer and consumer threads will be higher.
It works best in situations where low latency is not required, but a low impact on the producing thread is desired.
A common use case is for asynchronous logging.
--
- **YieldingWaitStrategy** ->
--
The `YieldingWaitStrategy` is one of two ``WaitStrategy``s that can be use in low-latency systems.
It is designed for cases where there is the option to burn CPU cycles with the goal of improving latency.
The `YieldingWaitStrategy` will busy spin, waiting for the sequence to increment to the appropriate value.
Inside the body of the loop `Thread#yield()` will be called allowing other queued threads to run.
This is the recommended wait strategy when you need very high performance, and the number of `EventHandler` threads is lower than the total number of logical cores, e.g. you have hyper-threading enabled.
--
- **BusySpinWaitStrategy** ->
--
The `BusySpinWaitStrategy` is the highest performing `WaitStrategy`.
Like the `YieldingWaitStrategy`, it can be used in low-latency systems, but puts the highest constraints on the deployment environment.
This wait strategy should only be used if the number of `EventHandler` threads is lower than the number of physical cores on the box, e.g. hyper-threading should be disabled.
--
=== Clearing Objects From the Ring Buffer
When passing data via the Disruptor, it is possible for objects to live longer than intended.
To avoid this happening it may be necessary to clear out the event after processing it.
If you have a single event handler, clearing out the value within the same handler is sufficient.
If you have a chain of event handlers, then you may need a specific handler placed at the end of the chain to handle clearing out the object.
.Example `ObjectEvent`
[source,java]
----
include::{gradle-rootdir}/src/examples/java/com/lmax/disruptor/examples/objectevent/ObjectEvent.java[tag=example]
----
.Example `ClearingEventHandler`
[source,java]
----
include::{gradle-rootdir}/src/examples/java/com/lmax/disruptor/examples/objectevent/ClearingEventHandler.java[tag=example]
----
<1> Failing to call `clear()` here will result in the object associated with the event to live until it is overwritten.
This will only happen once the ring buffer has wrapped around to the beginning.
.Example using the `ClearingEventHandler`
[source,java]
----
include::{gradle-rootdir}/src/examples/java/com/lmax/disruptor/examples/objectevent/Main.java[tag=example]
----
== Advanced Techniques
=== Dealing With Large Batches
.Example of "Early Release"
[source,java]
----
include::{gradle-rootdir}/src/examples/java/com/lmax/disruptor/examples/EarlyReleaseHandler.java[tag=example]
----
================================================
FILE: src/docs/asciidoc/en/user-guide/20_design_and_implementation.adoc
================================================
= Design and Implementation
:Author: LMAX Development Team
:Email:
:Date: {docdata}
// If you're changing these, also check out asciidoctor.gradle!
:xrefstyle: short
:icons: font
- Single Producer Algorithm
- Multiple Producer Algorithm
================================================
FILE: src/docs/asciidoc/en/user-guide/30_known_issues.adoc
================================================
= Known Issues
:Author: LMAX Development Team
:Email:
:Date: {docdata}
// If you're changing these, also check out asciidoctor.gradle!
:xrefstyle: short
:icons: font
- On 32 bit Linux systems it appears that `LockSupport.parkNanos()` is quite expensive, therefore using the `SleepingWaitStrategy` is not recommended.
================================================
FILE: src/docs/asciidoc/en/user-guide/40_batch_rewind_use_case.adoc
================================================
= Batch Rewind
:Author: LMAX Development Team
:Email:
:Date: {docdata}
== The Feature
When using the `BatchEventProcessor` to handle events as batches, there is a feature available that can be used to recover from an exception named "Batch Rewind".
If something goes wrong while handling an event that is recoverable, the user can throw a `RewindableException`. This will invoke the `BatchRewindStrategy` instead of the usual `ExceptionHandler` to decide whether the sequence number should rewind back to the beginning of the batch to be reattempted or rethrow and delegate to the `ExceptionHandler`.
e.g.
When using the `SimpleBatchRewindStrategy` (which will always rewind) then the `BatchEventProcessor` receives a batch from 150 -> 155, but a temporary failure happens on sequence 153 (which throws a `RewindableException`). The events processed will look like the following...
```
150, 151, 152, 153(failed -> rewind), 150, 151, 152, 153(succeeded this time), 154, 155
```
The default `BatchRewindStrategy` is the `SimpleBatchRewindStrategy` but different strategies can be provided to the `BatchEventProcessor` like so...
```
batchEventProcessor.setRewindStrategy(batchRewindStrategy);
```
== Use Case
This can be very useful when batches are handled as database transactions. So the start of a batch starts a transaction, events are handled as statements, and only committed at the end of a batch.
Happy case
```
Batch start -> START TRANSACTION;
Event 1 -> insert a row;
Event 2 -> insert a row;
Event 3 -> insert a row;
Batch end -> COMMIT;
```
Sad case without Batch Rewind
```
Batch start -> START TRANSACTION;
Event 1 -> insert a row;
Event 2 -> DATABASE has a blip and can not commit
Throw error -> ROLLBACK;
User needs to explcitily reattempt the batch or choose to abandon the batch
```
Sad case with Batch Rewind
```
Batch start -> START TRANSACTION;
Event 1 -> insert a row;
Event 2 -> DATABASE has a blip and can not insert
Throw RewindableException -> ROLLBACK;
Batch start -> START TRANSACTION;
Event 1 -> insert a row;
Event 2 -> insert a row;
Event 3 -> insert a row;
Batch end -> COMMIT;
```
================================================
FILE: src/docs/asciidoc/en/user-guide/index.adoc
================================================
= LMAX Disruptor User Guide
:Author: LMAX Development Team
:Email:
:Date: {docdata}
// If you're changing these, also check out asciidoctor.gradle!
:xrefstyle: short
:icons: font
:gradle-rootdir: ../../../../../
:imagesdir: ../../
The LMAX Disruptor is a high performance inter-thread messaging library. It grew out of LMAX's research into concurrency, performance and non-blocking algorithms and today forms a core part of their Exchange's infrastructure.
// Leave some gaps between these includes (trust me)
include::10_using_the_disruptor.adoc[leveloffset=+1]
include::20_design_and_implementation.adoc[leveloffset=+1]
include::30_known_issues.adoc[leveloffset=+1]
include::40_batch_rewind_use_case.adoc[leveloffset=+1]
================================================
FILE: src/examples/java/com/lmax/disruptor/examples/DynamicallyAddHandler.java
================================================
package com.lmax.disruptor.examples;
import com.lmax.disruptor.BatchEventProcessor;
import com.lmax.disruptor.BatchEventProcessorBuilder;
import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.RingBuffer;
import com.lmax.disruptor.dsl.Disruptor;
import com.lmax.disruptor.examples.support.StubEvent;
import com.lmax.disruptor.util.DaemonThreadFactory;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class DynamicallyAddHandler
{
private static class DynamicHandler implements EventHandler<StubEvent>
{
private final CountDownLatch shutdownLatch = new CountDownLatch(1);
@Override
public void onEvent(final StubEvent event, final long sequence, final boolean endOfBatch)
{
}
@Override
public void onStart()
{
}
@Override
public void onShutdown()
{
shutdownLatch.countDown();
}
public void awaitShutdown() throws InterruptedException
{
shutdownLatch.await();
}
}
public static void main(final String[] args) throws InterruptedException
{
ExecutorService executor = Executors.newCachedThreadPool(DaemonThreadFactory.INSTANCE);
// Build a disruptor and start it.
Disruptor<StubEvent> disruptor = new Disruptor<>(
StubEvent.EVENT_FACTORY, 1024, DaemonThreadFactory.INSTANCE);
RingBuffer<StubEvent> ringBuffer = disruptor.start();
// Construct 2 batch event processors.
DynamicHandler handler1 = new DynamicHandler();
BatchEventProcessor<StubEvent> processor1 =
new BatchEventProcessorBuilder().build(ringBuffer, ringBuffer.newBarrier(), handler1);
DynamicHandler handler2 = new DynamicHandler();
BatchEventProcessor<StubEvent> processor2 =
new BatchEventProcessorBuilder().build(ringBuffer, ringBuffer.newBarrier(processor1.getSequence()), handler2);
// Dynamically add both sequences to the ring buffer
ringBuffer.addGatingSequences(processor1.getSequence(), processor2.getSequence());
// Start the new batch processors.
executor.execute(processor1);
executor.execute(processor2);
// Remove a processor.
// Stop the processor
processor2.halt();
// Wait for shutdown the complete
handler2.awaitShutdown();
// Remove the gating sequence from the ring buffer
ringBuffer.removeGatingSequence(processor2.getSequence());
}
}
================================================
FILE: src/examples/java/com/lmax/disruptor/examples/EarlyReleaseHandler.java
================================================
package com.lmax.disruptor.examples;
import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.Sequence;
import com.lmax.disruptor.examples.support.LongEvent;
@SuppressWarnings("unused")
// tag::example[]
public class EarlyReleaseHandler implements EventHandler<LongEvent>
{
private Sequence sequenceCallback;
private int batchRemaining = 20;
@Override
public void setSequenceCallback(final Sequence sequenceCallback)
{
this.sequenceCallback = sequenceCallback;
}
@Override
public void onEvent(final LongEvent event, final long sequence, final boolean endOfBatch)
{
processEvent(event);
boolean logicalChunkOfWorkComplete = isLogicalChunkOfWorkComplete();
if (logicalChunkOfWorkComplete)
{
sequenceCallback.set(sequence);
}
batchRemaining = logicalChunkOfWorkComplete || endOfBatch ? 20 : batchRemaining;
}
private boolean isLogicalChunkOfWorkComplete()
{
// Ret true or false based on whatever criteria is required for the smaller
// chunk. If this is doing I/O, it may be after flushing/syncing to disk
// or at the end of DB batch+commit.
// Or it could simply be working off a smaller batch size.
return --batchRemaining == -1;
}
private void processEvent(final LongEvent event)
{
// Do processing
}
}
// end::example[]
================================================
FILE: src/examples/java/com/lmax/disruptor/examples/HandleExceptionOnTranslate.java
================================================
package com.lmax.disruptor.examples;
import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.EventTranslator;
import com.lmax.disruptor.dsl.Disruptor;
import com.lmax.disruptor.examples.support.LongEvent;
import com.lmax.disruptor.util.DaemonThreadFactory;
public class HandleExceptionOnTranslate
{
private static final int NO_VALUE_SPECIFIED = -1;
private static class MyHandler implements EventHandler<LongEvent>
{
@Override
public void onEvent(final LongEvent event, final long sequence, final boolean endOfBatch)
{
if (event.get() == NO_VALUE_SPECIFIED)
{
System.out.printf("Discarded%n");
}
else
{
System.out.printf("Processed: %s%n", event.get() == sequence);
}
}
}
public static void main(final String[] args) throws InterruptedException
{
Disruptor<LongEvent> disruptor = new Disruptor<>(LongEvent.FACTORY, 1024, DaemonThreadFactory.INSTANCE);
disruptor.handleEventsWith(new MyHandler());
disruptor.start();
EventTranslator<LongEvent> t = (event, sequence) ->
{
event.set(NO_VALUE_SPECIFIED);
if (sequence % 3 == 0)
{
throw new RuntimeException("Skipping");
}
event.set(sequence);
};
for (int i = 0; i < 10; i++)
{
try
{
disruptor.publishEvent(t);
}
catch (RuntimeException e)
{
// Skipping
}
}
Thread.sleep(5000);
}
}
================================================
FILE: src/examples/java/com/lmax/disruptor/examples/KeyedBatching.java
================================================
package com.lmax.disruptor.examples;
import com.lmax.disruptor.EventHandler;
import java.util.ArrayList;
import java.util.List;
public class KeyedBatching implements EventHandler<KeyedBatching.KeyedEvent>
{
private static final int MAX_BATCH_SIZE = 100;
private final List<Object> batch = new ArrayList<>();
private long key = 0;
@Override
public void onEvent(final KeyedEvent event, final long sequence, final boolean endOfBatch)
{
if (!batch.isEmpty() && event.key != key)
{
processBatch(batch);
}
batch.add(event.data);
key = event.key;
if (endOfBatch || batch.size() >= MAX_BATCH_SIZE)
{
processBatch(batch);
}
}
private void processBatch(final List<Object> batch)
{
// do work.
batch.clear();
}
public static class KeyedEvent
{
long key;
Object data;
}
}
================================================
FILE: src/examples/java/com/lmax/disruptor/examples/MultiProducerWithTranslator.java
================================================
package com.lmax.disruptor.examples;
import com.lmax.disruptor.BlockingWaitStrategy;
import com.lmax.disruptor.EventFactory;
import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.EventTranslatorThreeArg;
import com.lmax.disruptor.RingBuffer;
import com.lmax.disruptor.dsl.Disruptor;
import com.lmax.disruptor.dsl.ProducerType;
import com.lmax.disruptor.util.DaemonThreadFactory;
public class MultiProducerWithTranslator
{
private static class IMessage
{
}
private static class ITransportable
{
}
private static class ObjectBox
{
IMessage message;
ITransportable transportable;
String string;
private static final EventFactory<ObjectBox> FACTORY = ObjectBox::new;
public void setMessage(final IMessage arg0)
{
message = arg0;
}
public void setTransportable(final ITransportable arg1)
{
transportable = arg1;
}
public void setStreamName(final String arg2)
{
string = arg2;
}
}
public static class Publisher implements EventTranslatorThreeArg<ObjectBox, IMessage, ITransportable, String>
{
@Override
public void translateTo(final ObjectBox event, final long sequence, final IMessage arg0, final ITransportable arg1, final String arg2)
{
event.setMessage(arg0);
event.setTransportable(arg1);
event.setStreamName(arg2);
}
}
public static class Consumer implements EventHandler<ObjectBox>
{
@Override
public void onEvent(final ObjectBox event, final long sequence, final boolean endOfBatch)
{
}
}
static final int RING_SIZE = 1024;
public static void main(final String[] args) throws InterruptedException
{
Disruptor<ObjectBox> disruptor = new Disruptor<>(
ObjectBox.FACTORY, RING_SIZE, DaemonThreadFactory.INSTANCE, ProducerType.MULTI,
new BlockingWaitStrategy());
disruptor.handleEventsWith(new Consumer()).then(new Consumer());
final RingBuffer<ObjectBox> ringBuffer = disruptor.getRingBuffer();
Publisher p = new Publisher();
IMessage message = new IMessage();
ITransportable transportable = new ITransportable();
String streamName = "com.lmax.wibble";
System.out.println("publishing " + RING_SIZE + " messages");
for (int i = 0; i < RING_SIZE; i++)
{
ringBuffer.publishEvent(p, message, transportable, streamName);
Thread.sleep(10);
}
System.out.println("start disruptor");
disruptor.start();
System.out.println("continue publishing");
while (true)
{
ringBuffer.publishEvent(p, message, transportable, streamName);
Thread.sleep(10);
}
}
}
================================================
FILE: src/examples/java/com/lmax/disruptor/examples/NamedEventHandler.java
================================================
package com.lmax.disruptor.examples;
import com.lmax.disruptor.EventHandler;
public class NamedEventHandler<T> implements EventHandler<T>
{
private String oldName;
private final String name;
public NamedEventHandler(final String name)
{
this.name = name;
}
@Override
public void onEvent(final T event, final long sequence, final boolean endOfBatch)
{
}
@Override
public void onStart()
{
final Thread currentThread = Thread.currentThread();
oldName = currentThread.getName();
currentThread.setName(name);
}
@Override
public void onShutdown()
{
Thread.currentThread().setName(oldName);
}
}
================================================
FILE: src/examples/java/com/lmax/disruptor/examples/Pipeliner.java
================================================
package com.lmax.disruptor.examples;
import com.lmax.disruptor.EventFactory;
import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.RingBuffer;
import com.lmax.disruptor.dsl.Disruptor;
import com.lmax.disruptor.util.DaemonThreadFactory;
public class Pipeliner
{
public static void main(final String[] args)
{
Disruptor<PipelinerEvent> disruptor = new Disruptor<>(
PipelinerEvent.FACTORY, 1024, DaemonThreadFactory.INSTANCE);
disruptor.handleEventsWith(
new ParallelHandler(0, 3),
new ParallelHandler(1, 3),
new ParallelHandler(2, 3)
).then(new JoiningHandler());
RingBuffer<PipelinerEvent> ringBuffer = disruptor.start();
for (int i = 0; i < 1000; i++)
{
long next = ringBuffer.next();
try
{
PipelinerEvent pipelinerEvent = ringBuffer.get(next);
pipelinerEvent.input = i;
}
finally
{
ringBuffer.publish(next);
}
}
}
private static class ParallelHandler implements EventHandler<PipelinerEvent>
{
private final int ordinal;
private final int totalHandlers;
ParallelHandler(final int ordinal, final int totalHandlers)
{
this.ordinal = ordinal;
this.totalHandlers = totalHandlers;
}
@Override
public void onEvent(final PipelinerEvent event, final long sequence, final boolean endOfBatch)
{
if (sequence % totalHandlers == ordinal)
{
event.result = Long.toString(event.input);
}
}
}
private static class JoiningHandler implements EventHandler<PipelinerEvent>
{
private long lastEvent = -1;
@Override
public void onEvent(final PipelinerEvent event, final long sequence, final boolean endOfBatch)
{
if (event.input != lastEvent + 1 || event.result == null)
{
System.out.println("Error: " + event);
}
lastEvent = event.input;
event.result = null;
}
}
private static class PipelinerEvent
{
long input;
Object result;
private static final EventFactory<PipelinerEvent> FACTORY = PipelinerEvent::new;
@Override
public String toString()
{
return "PipelinerEvent{" +
"input=" + input +
", result=" + result +
'}';
}
}
}
================================================
FILE: src/examples/java/com/lmax/disruptor/examples/PullWithBatchedPoller.java
================================================
package com.lmax.disruptor.examples;
import com.lmax.disruptor.EventFactory;
import com.lmax.disruptor.EventPoller;
import com.lmax.disruptor.RingBuffer;
/**
* Alternative usage of EventPoller, here we wrap it around BatchedEventPoller
* to achieve Disruptor's batching. this speeds up the polling feature
*/
public class PullWithBatchedPoller
{
public static void main(final String[] args) throws Exception
{
int batchSize = 40;
RingBuffer<BatchedPoller.DataEvent<Object>> ringBuffer =
RingBuffer.createMultiProducer(BatchedPoller.DataEvent.factory(), 1024);
BatchedPoller<Object> poller = new BatchedPoller<>(ringBuffer, batchSize);
Object value = poller.poll();
// Value could be null if no events are available.
if (null != value)
{
// Process value.
}
}
static class BatchedPoller<T>
{
private final EventPoller<DataEvent<T>> poller;
private final BatchedData<T> polledData;
BatchedPoller(final RingBuffer<DataEvent<T>> ringBuffer, final int batchSize)
{
this.poller = ringBuffer.newPoller();
ringBuffer.addGatingSequences(poller.getSequence());
this.polledData = new BatchedData<>(batchSize);
}
public T poll() throws Exception
{
if (polledData.getMsgCount() > 0)
{
return polledData.pollMessage(); // we just fetch from our local
}
loadNextValues(poller, polledData); // we try to load from the ring
return polledData.getMsgCount() > 0 ? polledData.pollMessage() : null;
}
private EventPoller.PollState loadNextValues(final EventPoller<DataEvent<T>> poller, final BatchedData<T> batch)
throws Exception
{
return poller.poll((event, sequence, endOfBatch) ->
{
T item = event.copyOfData();
return item != null ? batch.addDataItem(item) : false;
});
}
public static class DataEvent<T>
{
T data;
public static <T> EventFactory<DataEvent<T>> factory()
{
return DataEvent::new;
}
public T copyOfData()
{
// Copy the data out here. In this case we have a single reference
// object, so the pass by
// reference is sufficient. But if we were reusing a byte array,
// then we
// would need to copy
// the actual contents.
return data;
}
void set(final T d)
{
data = d;
}
}
private static class BatchedData<T>
{
private int msgHighBound;
private final int capacity;
private final T[] data;
private int cursor;
@SuppressWarnings("unchecked")
BatchedData(final int size)
{
this.capacity = size;
data = (T[]) new Object[this.capacity];
}
private void clearCount()
{
msgHighBound = 0;
cursor = 0;
}
public int getMsgCount()
{
return msgHighBound - cursor;
}
public boolean addDataItem(final T item) throws IndexOutOfBoundsException
{
if (msgHighBound >= capacity)
{
throw new IndexOutOfBoundsException("Attempting to add item to full batch");
}
data[msgHighBound++] = item;
return msgHighBound < capacity;
}
public T pollMessage()
{
T rtVal = null;
if (cursor < msgHighBound)
{
rtVal = data[cursor++];
}
if (cursor > 0 && cursor >= msgHighBound)
{
clearCount();
}
return rtVal;
}
}
}
}
================================================
FILE: src/examples/java/com/lmax/disruptor/examples/PullWithPoller.java
================================================
package com.lmax.disruptor.examples;
import com.lmax.disruptor.EventFactory;
import com.lmax.disruptor.EventPoller;
import com.lmax.disruptor.RingBuffer;
public class PullWithPoller
{
public static class DataEvent<T>
{
T data;
public static <T> EventFactory<DataEvent<T>> factory()
{
return DataEvent::new;
}
public T copyOfData()
{
// Copy the data out here. In this case we have a single reference object, so the pass by
// reference is sufficient. But if we were reusing a byte array, then we would need to copy
// the actual contents.
return data;
}
}
public static void main(final String[] args) throws Exception
{
RingBuffer<DataEvent<Object>> ringBuffer = RingBuffer.createMultiProducer(DataEvent.factory(), 1024);
final EventPoller<DataEvent<Object>> poller = ringBuffer.newPoller();
Object value = getNextValue(poller);
// Value could be null if no events are available.
if (null != value)
{
// Process value.
}
}
private static Object getNextValue(final EventPoller<DataEvent<Object>> poller) throws Exception
{
final Object[] out = new Object[1];
poller.poll(
(event, sequence, endOfBatch) ->
{
out[0] = event.copyOfData();
// Return false so that only one event is processed at a time.
return false;
});
return out[0];
}
}
================================================
FILE: src/examples/java/com/lmax/disruptor/examples/SequentialThreeConsumers.java
================================================
package com.lmax.disruptor.examples;
import com.lmax.disruptor.dsl.Disruptor;
import com.lmax.disruptor.util.DaemonThreadFactory;
public class SequentialThreeConsumers
{
private static class MyEvent
{
private Object a;
private Object b;
private Object c;
private Object d;
}
public static void main(final String[] args)
{
Disruptor<MyEvent> disruptor = new Disruptor<>(MyEvent::new, 1024, DaemonThreadFactory.INSTANCE);
disruptor.handleEventsWith((event, sequence, endOfBatch) -> event.b = event.a)
.then((event, sequence, endOfBatch) -> event.c = event.b)
.then((event, sequence, endOfBatch) -> event.d = event.c);
disruptor.start();
}
}
================================================
FILE: src/examples/java/com/lmax/disruptor/examples/ShutdownOnError.java
================================================
package com.lmax.disruptor.examples;
import com.lmax.disruptor.EventFactory;
import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.ExceptionHandler;
import com.lmax.disruptor.RingBuffer;
import com.lmax.disruptor.dsl.Disruptor;
import com.lmax.disruptor.util.DaemonThreadFactory;
import java.util.concurrent.atomic.AtomicBoolean;
public class ShutdownOnError
{
private static class Event
{
public long value;
public static final EventFactory<Event> FACTORY = Event::new;
}
private static class Handler implements EventHandler<Event>
{
@Override
public void onEvent(final Event event, final long sequence, final boolean endOfBatch)
{
// do work, if a failure occurs throw exception.
}
}
private static final class ErrorHandler implements ExceptionHandler<Event>
{
private final AtomicBoolean running;
private ErrorHandler(final AtomicBoolean running)
{
this.running = running;
}
@Override
public void handleEventException(final Throwable ex, final long sequence, final Event event)
{
if (execeptionIsFatal(ex))
{
throw new RuntimeException(ex);
}
}
private boolean execeptionIsFatal(final Throwable ex)
{
// Do what is appropriate here.
return true;
}
@Override
public void handleOnStartException(final Throwable ex)
{
}
@Override
public void handleOnShutdownException(final Throwable ex)
{
}
}
public static void main(final String[] args)
{
Disruptor<Event> disruptor = new Disruptor<>(Event.FACTORY, 1024, DaemonThreadFactory.INSTANCE);
AtomicBoolean running = new AtomicBoolean(true);
ErrorHandler errorHandler = new ErrorHandler(running);
final Handler handler = new Handler();
disruptor.handleEventsWith(handler);
disruptor.handleExceptionsFor(handler).with(errorHandler);
simplePublish(disruptor, running);
}
private static void simplePublish(final Disruptor<Event> disruptor, final AtomicBoolean running)
{
while (running.get())
{
disruptor.publishEvent((event, sequence) -> event.value = sequence);
}
}
private static void smarterP
gitextract_mzd229g4/
├── .editorconfig
├── .githooks/
│ └── pre-commit
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ └── workflows/
│ ├── asciidoc-build-only.yml
│ ├── asciidoc.yml
│ ├── codeql-analysis.yml
│ ├── gradle-build.yml
│ ├── gradle-wrapper-validation.yml
│ ├── jcstress-manual.yml
│ └── jcstress-quick.yml
├── .gitignore
├── .lgtm.yml
├── CHANGELOG.adoc
├── LICENCE.txt
├── README.adoc
├── build.gradle
├── config/
│ └── checkstyle/
│ ├── checkstyle.xml
│ └── suppress.xml
├── gradle/
│ ├── asciidoc.gradle
│ ├── jcstress.gradle
│ ├── jmh.gradle
│ ├── maven.gradle
│ ├── perf.gradle
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── src/
├── docs/
│ └── asciidoc/
│ └── en/
│ ├── changelog.adoc
│ ├── developer-guide/
│ │ ├── 10_getting_and_building.adoc
│ │ ├── 20_performance_tests.adoc
│ │ ├── 25_jsctress_tests.adoc
│ │ ├── 30_publishing_release.adoc
│ │ ├── 90_tips.adoc
│ │ └── index.adoc
│ ├── disruptor.adoc
│ ├── index.adoc
│ └── user-guide/
│ ├── 10_using_the_disruptor.adoc
│ ├── 20_design_and_implementation.adoc
│ ├── 30_known_issues.adoc
│ ├── 40_batch_rewind_use_case.adoc
│ └── index.adoc
├── examples/
│ └── java/
│ └── com/
│ └── lmax/
│ └── disruptor/
│ └── examples/
│ ├── DynamicallyAddHandler.java
│ ├── EarlyReleaseHandler.java
│ ├── HandleExceptionOnTranslate.java
│ ├── KeyedBatching.java
│ ├── MultiProducerWithTranslator.java
│ ├── NamedEventHandler.java
│ ├── Pipeliner.java
│ ├── PullWithBatchedPoller.java
│ ├── PullWithPoller.java
│ ├── SequentialThreeConsumers.java
│ ├── ShutdownOnError.java
│ ├── ThreeToOneDisruptor.java
│ ├── WaitForProcessing.java
│ ├── WaitForShutdown.java
│ ├── longevent/
│ │ ├── LongEvent.java
│ │ ├── LongEventFactory.java
│ │ ├── LongEventHandler.java
│ │ ├── LongEventProducer.java
│ │ ├── LongEventProducerWithTranslator.java
│ │ ├── lambdas/
│ │ │ └── LongEventMain.java
│ │ ├── legacy/
│ │ │ ├── LongEventMain.java
│ │ │ └── LongEventProducer.java
│ │ └── methodrefs/
│ │ └── LongEventMain.java
│ ├── objectevent/
│ │ ├── ClearingEventHandler.java
│ │ ├── Main.java
│ │ ├── ObjectEvent.java
│ │ └── ProcessingEventHandler.java
│ └── support/
│ ├── LongEvent.java
│ └── StubEvent.java
├── jcstress/
│ └── java/
│ └── com/
│ └── lmax/
│ └── disruptor/
│ ├── LoggerInitializationStress.java
│ ├── MultiProducerSequencerUnsafeStress.java
│ ├── MultiProducerSequencerVarHandleStress.java
│ ├── SequenceStressUnsafe.java
│ ├── SequenceStressVarHandle.java
│ └── SequenceStressVarHandleBarrier.java
├── jmh/
│ └── java/
│ └── com/
│ └── lmax/
│ └── disruptor/
│ ├── ArrayAccessBenchmark.java
│ ├── BlockingQueueBenchmark.java
│ ├── MultiProducerSequencerBenchmark.java
│ ├── MultiProducerSingleConsumer.java
│ ├── RingBufferBenchmark.java
│ ├── RingBufferFalseSharingBenchmark.java
│ ├── SequenceBenchmark.java
│ ├── SingleProducerSingleConsumer.java
│ └── util/
│ ├── Constants.java
│ ├── SimpleEvent.java
│ └── SimpleEventHandler.java
├── main/
│ └── java/
│ ├── com/
│ │ └── lmax/
│ │ └── disruptor/
│ │ ├── AbstractSequencer.java
│ │ ├── AggregateEventHandler.java
│ │ ├── AlertException.java
│ │ ├── BatchEventProcessor.java
│ │ ├── BatchEventProcessorBuilder.java
│ │ ├── BatchRewindStrategy.java
│ │ ├── BlockingWaitStrategy.java
│ │ ├── BusySpinWaitStrategy.java
│ │ ├── Cursored.java
│ │ ├── DataProvider.java
│ │ ├── EventFactory.java
│ │ ├── EventHandler.java
│ │ ├── EventHandlerBase.java
│ │ ├── EventHandlerIdentity.java
│ │ ├── EventPoller.java
│ │ ├── EventProcessor.java
│ │ ├── EventSequencer.java
│ │ ├── EventSink.java
│ │ ├── EventTranslator.java
│ │ ├── EventTranslatorOneArg.java
│ │ ├── EventTranslatorThreeArg.java
│ │ ├── EventTranslatorTwoArg.java
│ │ ├── EventTranslatorVararg.java
│ │ ├── EventuallyGiveUpBatchRewindStrategy.java
│ │ ├── ExceptionHandler.java
│ │ ├── ExceptionHandlers.java
│ │ ├── FatalExceptionHandler.java
│ │ ├── FixedSequenceGroup.java
│ │ ├── IgnoreExceptionHandler.java
│ │ ├── InsufficientCapacityException.java
│ │ ├── LiteBlockingWaitStrategy.java
│ │ ├── LiteTimeoutBlockingWaitStrategy.java
│ │ ├── MultiProducerSequencer.java
│ │ ├── NanosecondPauseBatchRewindStrategy.java
│ │ ├── NoOpEventProcessor.java
│ │ ├── PhasedBackoffWaitStrategy.java
│ │ ├── ProcessingSequenceBarrier.java
│ │ ├── RewindAction.java
│ │ ├── RewindHandler.java
│ │ ├── RewindableEventHandler.java
│ │ ├── RewindableException.java
│ │ ├── RingBuffer.java
│ │ ├── Sequence.java
│ │ ├── SequenceBarrier.java
│ │ ├── SequenceGroup.java
│ │ ├── SequenceGroups.java
│ │ ├── Sequenced.java
│ │ ├── Sequencer.java
│ │ ├── SimpleBatchRewindStrategy.java
│ │ ├── SingleProducerSequencer.java
│ │ ├── SleepingWaitStrategy.java
│ │ ├── TimeoutBlockingWaitStrategy.java
│ │ ├── TimeoutException.java
│ │ ├── WaitStrategy.java
│ │ ├── YieldingWaitStrategy.java
│ │ ├── dsl/
│ │ │ ├── ConsumerInfo.java
│ │ │ ├── ConsumerRepository.java
│ │ │ ├── Disruptor.java
│ │ │ ├── EventHandlerGroup.java
│ │ │ ├── EventProcessorFactory.java
│ │ │ ├── EventProcessorInfo.java
│ │ │ ├── ExceptionHandlerSetting.java
│ │ │ ├── ExceptionHandlerWrapper.java
│ │ │ ├── ProducerType.java
│ │ │ └── package-info.java
│ │ ├── package-info.java
│ │ └── util/
│ │ ├── DaemonThreadFactory.java
│ │ ├── ThreadHints.java
│ │ ├── Util.java
│ │ └── package-info.java
│ └── module-info.java
├── perftest/
│ └── java/
│ └── com/
│ └── lmax/
│ └── disruptor/
│ ├── AbstractPerfTestDisruptor.java
│ ├── AbstractPerfTestQueue.java
│ ├── PerfTestContext.java
│ ├── immutable/
│ │ ├── Constants.java
│ │ ├── CustomPerformanceTest.java
│ │ ├── CustomRingBuffer.java
│ │ ├── EventAccessor.java
│ │ ├── EventHolder.java
│ │ ├── EventHolderHandler.java
│ │ ├── SimpleEvent.java
│ │ ├── SimpleEventHandler.java
│ │ └── SimplePerformanceTest.java
│ ├── offheap/
│ │ ├── OneToOneOffHeapThroughputTest.java
│ │ └── OneToOneOnHeapThroughputTest.java
│ ├── queue/
│ │ ├── OneToOneQueueBatchedThroughputTest.java
│ │ ├── OneToOneQueueThroughputTest.java
│ │ ├── OneToThreeDiamondQueueThroughputTest.java
│ │ ├── OneToThreePipelineQueueThroughputTest.java
│ │ ├── OneToThreeQueueThroughputTest.java
│ │ ├── PingPongQueueLatencyTest.java
│ │ ├── ThreeToOneQueueBatchThroughputTest.java
│ │ └── ThreeToOneQueueThroughputTest.java
│ ├── raw/
│ │ ├── OneToOneRawBatchThroughputTest.java
│ │ └── OneToOneRawThroughputTest.java
│ ├── sequenced/
│ │ ├── OneToOneSequencedBatchThroughputTest.java
│ │ ├── OneToOneSequencedLongArrayThroughputTest.java
│ │ ├── OneToOneSequencedPollerThroughputTest.java
│ │ ├── OneToOneSequencedThroughputTest.java
│ │ ├── OneToThreeDiamondSequencedThroughputTest.java
│ │ ├── OneToThreePipelineSequencedThroughputTest.java
│ │ ├── OneToThreeSequencedThroughputTest.java
│ │ ├── PingPongSequencedLatencyTest.java
│ │ ├── ThreeToOneSequencedBatchThroughputTest.java
│ │ ├── ThreeToOneSequencedThroughputTest.java
│ │ └── ThreeToThreeSequencedThroughputTest.java
│ ├── support/
│ │ ├── EventCountingQueueProcessor.java
│ │ ├── FizzBuzzEvent.java
│ │ ├── FizzBuzzEventHandler.java
│ │ ├── FizzBuzzQueueProcessor.java
│ │ ├── FizzBuzzStep.java
│ │ ├── FunctionEvent.java
│ │ ├── FunctionEventHandler.java
│ │ ├── FunctionQueueProcessor.java
│ │ ├── FunctionStep.java
│ │ ├── LongArrayEventHandler.java
│ │ ├── LongArrayPublisher.java
│ │ ├── MultiBufferBatchEventProcessor.java
│ │ ├── Operation.java
│ │ ├── PerfTestUtil.java
│ │ ├── ValueAdditionBatchQueueProcessor.java
│ │ ├── ValueAdditionEventHandler.java
│ │ ├── ValueAdditionQueueBatchProcessor.java
│ │ ├── ValueAdditionQueueProcessor.java
│ │ ├── ValueBatchPublisher.java
│ │ ├── ValueEvent.java
│ │ ├── ValueMutationEventHandler.java
│ │ ├── ValueMutationQueueProcessor.java
│ │ ├── ValuePublisher.java
│ │ └── ValueQueuePublisher.java
│ └── translator/
│ └── OneToOneTranslatorThroughputTest.java
└── test/
└── java/
└── com/
└── lmax/
└── disruptor/
├── AggregateEventHandlerTest.java
├── BatchEventProcessorTest.java
├── BatchingTest.java
├── BusySpinWaitStrategyTest.java
├── DisruptorStressTest.java
├── EventPollerTest.java
├── EventPublisherTest.java
├── EventTranslatorTest.java
├── FatalExceptionHandlerTest.java
├── FixedSequenceGroupTest.java
├── IgnoreExceptionHandlerTest.java
├── LifecycleAwareTest.java
├── LiteTimeoutBlockingWaitStrategyTest.java
├── MaxBatchSizeEventProcessorTest.java
├── MultiProducerSequencerTest.java
├── PhasedBackoffWaitStrategyTest.java
├── RewindBatchEventProcessorTest.java
├── RingBufferEventMatcher.java
├── RingBufferTest.java
├── RingBufferWithAssertingStubTest.java
├── SequenceBarrierTest.java
├── SequenceGroupTest.java
├── SequenceReportingCallbackTest.java
├── SequenceTest.java
├── SequencerTest.java
├── ShutdownOnFatalExceptionTest.java
├── SingleProducerSequencerTest.java
├── SleepingWaitStrategyTest.java
├── TimeoutBlockingWaitStrategyTest.java
├── YieldingWaitStrategyTest.java
├── alternatives/
│ ├── MultiProducerSequencerUnsafe.java
│ ├── MultiProducerSequencerVarHandle.java
│ ├── RingBufferArray.java
│ ├── RingBufferUnsafe.java
│ ├── SequenceDoublePadded.java
│ ├── SequenceUnsafe.java
│ ├── SequenceVarHandle.java
│ ├── SequenceVarHandleArray.java
│ └── SequenceVarHandleBarrier.java
├── dsl/
│ ├── ConsumerRepositoryTest.java
│ ├── DisruptorTest.java
│ └── stubs/
│ ├── DelayedEventHandler.java
│ ├── EventHandlerStub.java
│ ├── EvilEqualsEventHandler.java
│ ├── ExceptionThrowingEventHandler.java
│ ├── SleepingEventHandler.java
│ ├── StubExceptionHandler.java
│ ├── StubPublisher.java
│ └── StubThreadFactory.java
├── support/
│ ├── DummyEventHandler.java
│ ├── DummyEventProcessor.java
│ ├── DummySequenceBarrier.java
│ ├── DummyWaitStrategy.java
│ ├── LongEvent.java
│ ├── SequenceUpdater.java
│ ├── StubEvent.java
│ ├── TestEvent.java
│ ├── TestWaiter.java
│ └── WaitStrategyTestUtil.java
└── util/
├── MutableLong.java
├── PaddedLong.java
├── UnsafeAccess.java
└── UtilTest.java
SYMBOL INDEX (2030 symbols across 236 files)
FILE: src/examples/java/com/lmax/disruptor/examples/DynamicallyAddHandler.java
class DynamicallyAddHandler (line 15) | public class DynamicallyAddHandler
class DynamicHandler (line 17) | private static class DynamicHandler implements EventHandler<StubEvent>
method onEvent (line 21) | @Override
method onStart (line 26) | @Override
method onShutdown (line 32) | @Override
method awaitShutdown (line 38) | public void awaitShutdown() throws InterruptedException
method main (line 44) | public static void main(final String[] args) throws InterruptedException
FILE: src/examples/java/com/lmax/disruptor/examples/EarlyReleaseHandler.java
class EarlyReleaseHandler (line 7) | @SuppressWarnings("unused")
method setSequenceCallback (line 14) | @Override
method onEvent (line 20) | @Override
method isLogicalChunkOfWorkComplete (line 34) | private boolean isLogicalChunkOfWorkComplete()
method processEvent (line 44) | private void processEvent(final LongEvent event)
FILE: src/examples/java/com/lmax/disruptor/examples/HandleExceptionOnTranslate.java
class HandleExceptionOnTranslate (line 9) | public class HandleExceptionOnTranslate
class MyHandler (line 13) | private static class MyHandler implements EventHandler<LongEvent>
method onEvent (line 16) | @Override
method main (line 30) | public static void main(final String[] args) throws InterruptedException
FILE: src/examples/java/com/lmax/disruptor/examples/KeyedBatching.java
class KeyedBatching (line 8) | public class KeyedBatching implements EventHandler<KeyedBatching.KeyedEv...
method onEvent (line 14) | @Override
method processBatch (line 31) | private void processBatch(final List<Object> batch)
class KeyedEvent (line 37) | public static class KeyedEvent
FILE: src/examples/java/com/lmax/disruptor/examples/MultiProducerWithTranslator.java
class MultiProducerWithTranslator (line 12) | public class MultiProducerWithTranslator
class IMessage (line 14) | private static class IMessage
class ITransportable (line 18) | private static class ITransportable
class ObjectBox (line 22) | private static class ObjectBox
method setMessage (line 30) | public void setMessage(final IMessage arg0)
method setTransportable (line 35) | public void setTransportable(final ITransportable arg1)
method setStreamName (line 40) | public void setStreamName(final String arg2)
class Publisher (line 46) | public static class Publisher implements EventTranslatorThreeArg<Objec...
method translateTo (line 48) | @Override
class Consumer (line 57) | public static class Consumer implements EventHandler<ObjectBox>
method onEvent (line 59) | @Override
method main (line 68) | public static void main(final String[] args) throws InterruptedException
FILE: src/examples/java/com/lmax/disruptor/examples/NamedEventHandler.java
class NamedEventHandler (line 5) | public class NamedEventHandler<T> implements EventHandler<T>
method NamedEventHandler (line 10) | public NamedEventHandler(final String name)
method onEvent (line 15) | @Override
method onStart (line 20) | @Override
method onShutdown (line 28) | @Override
FILE: src/examples/java/com/lmax/disruptor/examples/Pipeliner.java
class Pipeliner (line 9) | public class Pipeliner
method main (line 11) | public static void main(final String[] args)
class ParallelHandler (line 39) | private static class ParallelHandler implements EventHandler<Pipeliner...
method ParallelHandler (line 44) | ParallelHandler(final int ordinal, final int totalHandlers)
method onEvent (line 50) | @Override
class JoiningHandler (line 60) | private static class JoiningHandler implements EventHandler<PipelinerE...
method onEvent (line 64) | @Override
class PipelinerEvent (line 77) | private static class PipelinerEvent
method toString (line 84) | @Override
FILE: src/examples/java/com/lmax/disruptor/examples/PullWithBatchedPoller.java
class PullWithBatchedPoller (line 11) | public class PullWithBatchedPoller
method main (line 13) | public static void main(final String[] args) throws Exception
class BatchedPoller (line 30) | static class BatchedPoller<T>
method BatchedPoller (line 35) | BatchedPoller(final RingBuffer<DataEvent<T>> ringBuffer, final int b...
method poll (line 42) | public T poll() throws Exception
method loadNextValues (line 53) | private EventPoller.PollState loadNextValues(final EventPoller<DataE...
class DataEvent (line 63) | public static class DataEvent<T>
method factory (line 67) | public static <T> EventFactory<DataEvent<T>> factory()
method copyOfData (line 72) | public T copyOfData()
method set (line 83) | void set(final T d)
class BatchedData (line 89) | private static class BatchedData<T>
method BatchedData (line 96) | @SuppressWarnings("unchecked")
method clearCount (line 103) | private void clearCount()
method getMsgCount (line 109) | public int getMsgCount()
method addDataItem (line 114) | public boolean addDataItem(final T item) throws IndexOutOfBoundsEx...
method pollMessage (line 125) | public T pollMessage()
FILE: src/examples/java/com/lmax/disruptor/examples/PullWithPoller.java
class PullWithPoller (line 7) | public class PullWithPoller
class DataEvent (line 9) | public static class DataEvent<T>
method factory (line 13) | public static <T> EventFactory<DataEvent<T>> factory()
method copyOfData (line 18) | public T copyOfData()
method main (line 27) | public static void main(final String[] args) throws Exception
method getNextValue (line 42) | private static Object getNextValue(final EventPoller<DataEvent<Object>...
FILE: src/examples/java/com/lmax/disruptor/examples/SequentialThreeConsumers.java
class SequentialThreeConsumers (line 6) | public class SequentialThreeConsumers
class MyEvent (line 8) | private static class MyEvent
method main (line 16) | public static void main(final String[] args)
FILE: src/examples/java/com/lmax/disruptor/examples/ShutdownOnError.java
class ShutdownOnError (line 12) | public class ShutdownOnError
class Event (line 14) | private static class Event
class Handler (line 21) | private static class Handler implements EventHandler<Event>
method onEvent (line 23) | @Override
class ErrorHandler (line 30) | private static final class ErrorHandler implements ExceptionHandler<Ev...
method ErrorHandler (line 34) | private ErrorHandler(final AtomicBoolean running)
method handleEventException (line 39) | @Override
method execeptionIsFatal (line 48) | private boolean execeptionIsFatal(final Throwable ex)
method handleOnStartException (line 54) | @Override
method handleOnShutdownException (line 60) | @Override
method main (line 67) | public static void main(final String[] args)
method simplePublish (line 82) | private static void simplePublish(final Disruptor<Event> disruptor, fi...
method smarterPublish (line 90) | private static void smarterPublish(final Disruptor<Event> disruptor, f...
FILE: src/examples/java/com/lmax/disruptor/examples/ThreeToOneDisruptor.java
class ThreeToOneDisruptor (line 9) | public class ThreeToOneDisruptor
class DataEvent (line 11) | public static class DataEvent
method DataEvent (line 16) | public DataEvent(final int size)
class TransformingHandler (line 24) | public static class TransformingHandler implements EventHandler<DataEv...
method TransformingHandler (line 28) | public TransformingHandler(final int outputIndex)
method onEvent (line 33) | @Override
method doSomething (line 40) | private Object doSomething(final Object input)
class CollatingHandler (line 47) | public static class CollatingHandler implements EventHandler<DataEvent>
method onEvent (line 49) | @Override
method collate (line 55) | private void collate(final Object[] output)
method main (line 61) | public static void main(final String[] args)
FILE: src/examples/java/com/lmax/disruptor/examples/WaitForProcessing.java
class WaitForProcessing (line 10) | public class WaitForProcessing
class Consumer (line 12) | public static class Consumer implements EventHandler<LongEvent>
method onEvent (line 14) | @Override
method main (line 21) | public static void main(final String[] args)
method waitForRingBufferToBeIdle (line 39) | @SuppressWarnings("StatementWithEmptyBody")
method waitForSpecificConsumer (line 48) | private static void waitForSpecificConsumer(
FILE: src/examples/java/com/lmax/disruptor/examples/WaitForShutdown.java
class WaitForShutdown (line 12) | public class WaitForShutdown
class Handler (line 16) | private static class Handler implements EventHandler<LongEvent>
method Handler (line 20) | Handler(final CountDownLatch latch)
method onStart (line 25) | @Override
method onShutdown (line 30) | @Override
method onEvent (line 36) | @Override
method main (line 43) | public static void main(final String[] args) throws TimeoutException, ...
FILE: src/examples/java/com/lmax/disruptor/examples/longevent/LongEvent.java
class LongEvent (line 4) | public class LongEvent
method set (line 8) | public void set(long value)
method toString (line 13) | @Override
FILE: src/examples/java/com/lmax/disruptor/examples/longevent/LongEventFactory.java
class LongEventFactory (line 6) | public class LongEventFactory implements EventFactory<LongEvent>
method newInstance (line 8) | @Override
FILE: src/examples/java/com/lmax/disruptor/examples/longevent/LongEventHandler.java
class LongEventHandler (line 6) | public class LongEventHandler implements EventHandler<LongEvent>
method onEvent (line 8) | @Override
FILE: src/examples/java/com/lmax/disruptor/examples/longevent/LongEventProducer.java
class LongEventProducer (line 10) | public class LongEventProducer
method LongEventProducer (line 14) | public LongEventProducer(RingBuffer<LongEvent> ringBuffer)
method translateTo (line 22) | @Override
method onData (line 29) | public void onData(ByteBuffer bb)
FILE: src/examples/java/com/lmax/disruptor/examples/longevent/LongEventProducerWithTranslator.java
class LongEventProducerWithTranslator (line 9) | public class LongEventProducerWithTranslator
method LongEventProducerWithTranslator (line 13) | public LongEventProducerWithTranslator(RingBuffer<LongEvent> ringBuffer)
method translateTo (line 21) | @Override
method onData (line 28) | public void onData(ByteBuffer bb)
FILE: src/examples/java/com/lmax/disruptor/examples/longevent/lambdas/LongEventMain.java
class LongEventMain (line 10) | public class LongEventMain
method main (line 12) | public static void main(String[] args) throws Exception
FILE: src/examples/java/com/lmax/disruptor/examples/longevent/legacy/LongEventMain.java
class LongEventMain (line 13) | public class LongEventMain
method main (line 15) | public static void main(String[] args) throws Exception
FILE: src/examples/java/com/lmax/disruptor/examples/longevent/legacy/LongEventProducer.java
class LongEventProducer (line 9) | public class LongEventProducer
method LongEventProducer (line 13) | public LongEventProducer(RingBuffer<LongEvent> ringBuffer)
method onData (line 18) | public void onData(ByteBuffer bb)
FILE: src/examples/java/com/lmax/disruptor/examples/longevent/methodrefs/LongEventMain.java
class LongEventMain (line 12) | public class LongEventMain
method handleEvent (line 14) | public static void handleEvent(LongEvent event, long sequence, boolean...
method translate (line 19) | public static void translate(LongEvent event, long sequence, ByteBuffe...
method main (line 24) | public static void main(String[] args) throws Exception
FILE: src/examples/java/com/lmax/disruptor/examples/objectevent/ClearingEventHandler.java
class ClearingEventHandler (line 6) | public class ClearingEventHandler<T> implements EventHandler<ObjectEvent...
method onEvent (line 8) | @Override
FILE: src/examples/java/com/lmax/disruptor/examples/objectevent/Main.java
class Main (line 6) | @SuppressWarnings("unchecked")
method main (line 12) | public static void main(String[] args)
FILE: src/examples/java/com/lmax/disruptor/examples/objectevent/ObjectEvent.java
class ObjectEvent (line 4) | class ObjectEvent<T>
method clear (line 8) | void clear()
FILE: src/examples/java/com/lmax/disruptor/examples/objectevent/ProcessingEventHandler.java
class ProcessingEventHandler (line 5) | public class ProcessingEventHandler<T> implements EventHandler<ObjectEve...
method onEvent (line 7) | @Override
FILE: src/examples/java/com/lmax/disruptor/examples/support/LongEvent.java
class LongEvent (line 5) | public class LongEvent
method set (line 11) | public void set(final long value)
method get (line 16) | public long get()
FILE: src/examples/java/com/lmax/disruptor/examples/support/StubEvent.java
class StubEvent (line 21) | public final class StubEvent
method StubEvent (line 31) | public StubEvent(final int i)
method copy (line 36) | public void copy(final StubEvent event)
method getValue (line 41) | public int getValue()
method setValue (line 46) | public void setValue(final int value)
method getTestString (line 51) | public String getTestString()
method setTestString (line 56) | public void setTestString(final String testString)
method equals (line 63) | @Override
method hashCode (line 84) | @Override
FILE: src/jcstress/java/com/lmax/disruptor/LoggerInitializationStress.java
class LoggerInitializationStress (line 26) | @JCStressTest(Mode.Termination)
method actor (line 42) | @Actor
method signal (line 69) | @Signal
class DisruptorLogManager (line 85) | public static final class DisruptorLogManager extends LogManager
class SimpleEvent (line 93) | public static final class SimpleEvent
method getValue (line 97) | public long getValue()
method setValue (line 102) | public void setValue(final long value)
method toString (line 107) | @Override
type SimpleEventHandler (line 116) | public enum SimpleEventHandler implements EventHandler<SimpleEvent>
method onEvent (line 120) | @Override
type SimpleEventExceptionHandler (line 127) | public enum SimpleEventExceptionHandler implements ExceptionHandler<Si...
method handleEventException (line 131) | @Override
method handleOnStartException (line 137) | @Override
method handleOnShutdownException (line 143) | @Override
FILE: src/jcstress/java/com/lmax/disruptor/MultiProducerSequencerUnsafeStress.java
class MultiProducerSequencerUnsafeStress (line 13) | public final class MultiProducerSequencerUnsafeStress
method createSequencer (line 15) | private static Sequencer createSequencer()
class PublishUpdatesIsAvailableLazily (line 20) | @JCStressTest
method actor1 (line 28) | @Actor
method actor2 (line 36) | @Actor
class GetVolatile (line 52) | @JCStressTest
method actor1 (line 63) | @Actor
method actor2 (line 70) | @Actor
class SameVolatileRead (line 83) | @JCStressTest
class Holder (line 94) | private static class Holder
method actor1 (line 99) | @Actor
method actor2 (line 105) | @Actor
FILE: src/jcstress/java/com/lmax/disruptor/MultiProducerSequencerVarHandleStress.java
class MultiProducerSequencerVarHandleStress (line 13) | public final class MultiProducerSequencerVarHandleStress
method createSequencer (line 15) | private static Sequencer createSequencer()
class PublishUpdatesIsAvailableLazily (line 20) | @JCStressTest
method actor1 (line 28) | @Actor
method actor2 (line 35) | @Actor
class GetVolatile (line 50) | @JCStressTest
method actor1 (line 61) | @Actor
method actor2 (line 68) | @Actor
class SameVolatileRead (line 81) | @JCStressTest
class Holder (line 92) | private static class Holder
method actor1 (line 97) | @Actor
method actor2 (line 103) | @Actor
FILE: src/jcstress/java/com/lmax/disruptor/SequenceStressUnsafe.java
class SequenceStressUnsafe (line 18) | public class SequenceStressUnsafe
class IncrementAndGet (line 23) | @JCStressTest
method actor1 (line 31) | @Actor
method actor2 (line 37) | @Actor
method arbiter (line 43) | @Arbiter
class CompareAndSet (line 53) | @JCStressTest
method actor1 (line 61) | @Actor
method actor2 (line 67) | @Actor
method arbiter (line 73) | @Arbiter
class AddAndGet (line 83) | @JCStressTest
method actor1 (line 92) | @Actor
method actor2 (line 98) | @Actor
method arbiter (line 104) | @Arbiter
class LongFullSet (line 116) | @JCStressTest
method writer (line 126) | @Actor
method reader (line 132) | @Actor
class LongFullSetVolatile (line 143) | @JCStressTest
method writer (line 153) | @Actor
method reader (line 159) | @Actor
class LongFullCompareAndSet (line 170) | @JCStressTest
method writer (line 180) | @Actor
method reader (line 186) | @Actor
class SameVolatileRead (line 199) | @JCStressTest
class Holder (line 210) | private static class Holder
method actor1 (line 215) | @Actor
method actor2 (line 221) | @Actor
class SetVolatileGuard (line 240) | @JCStressTest
method actor1 (line 251) | @Actor
method actor2 (line 258) | @Actor
class SetGuard (line 275) | @JCStressTest
method actor1 (line 286) | @Actor
method actor2 (line 293) | @Actor
class SetVolatileDekker (line 305) | @JCStressTest
method actor1 (line 314) | @Actor
method actor2 (line 321) | @Actor
class SetDekker (line 333) | @JCStressTest
method actor1 (line 342) | @Actor
method actor2 (line 349) | @Actor
FILE: src/jcstress/java/com/lmax/disruptor/SequenceStressVarHandle.java
class SequenceStressVarHandle (line 18) | public class SequenceStressVarHandle
class IncrementAndGet (line 23) | @JCStressTest
method actor1 (line 31) | @Actor
method actor2 (line 37) | @Actor
method arbiter (line 43) | @Arbiter
class CompareAndSet (line 53) | @JCStressTest
method actor1 (line 61) | @Actor
method actor2 (line 67) | @Actor
method arbiter (line 73) | @Arbiter
class AddAndGet (line 83) | @JCStressTest
method actor1 (line 92) | @Actor
method actor2 (line 98) | @Actor
method arbiter (line 104) | @Arbiter
class LongFullSet (line 116) | @JCStressTest
method writer (line 126) | @Actor
method reader (line 132) | @Actor
class LongFullSetVolatile (line 143) | @JCStressTest
method writer (line 153) | @Actor
method reader (line 159) | @Actor
class LongFullCompareAndSet (line 170) | @JCStressTest
method writer (line 180) | @Actor
method reader (line 186) | @Actor
class SameVolatileRead (line 199) | @JCStressTest
class Holder (line 210) | private static class Holder
method actor1 (line 215) | @Actor
method actor2 (line 221) | @Actor
class SetVolatileGuard (line 240) | @JCStressTest
method actor1 (line 251) | @Actor
method actor2 (line 258) | @Actor
class SetGuard (line 275) | @JCStressTest
method actor1 (line 286) | @Actor
method actor2 (line 293) | @Actor
class SetVolatileDekker (line 305) | @JCStressTest
method actor1 (line 314) | @Actor
method actor2 (line 321) | @Actor
class SetDekker (line 333) | @JCStressTest
method actor1 (line 342) | @Actor
method actor2 (line 349) | @Actor
FILE: src/jcstress/java/com/lmax/disruptor/SequenceStressVarHandleBarrier.java
class SequenceStressVarHandleBarrier (line 18) | public class SequenceStressVarHandleBarrier
class IncrementAndGet (line 23) | @JCStressTest
method actor1 (line 31) | @Actor
method actor2 (line 37) | @Actor
method arbiter (line 43) | @Arbiter
class CompareAndSet (line 53) | @JCStressTest
method actor1 (line 61) | @Actor
method actor2 (line 67) | @Actor
method arbiter (line 73) | @Arbiter
class AddAndGet (line 83) | @JCStressTest
method actor1 (line 92) | @Actor
method actor2 (line 98) | @Actor
method arbiter (line 104) | @Arbiter
class LongFullSet (line 116) | @JCStressTest
method writer (line 126) | @Actor
method reader (line 132) | @Actor
class LongFullSetVolatile (line 143) | @JCStressTest
method writer (line 153) | @Actor
method reader (line 159) | @Actor
class LongFullCompareAndSet (line 170) | @JCStressTest
method writer (line 180) | @Actor
method reader (line 186) | @Actor
class SameVolatileRead (line 199) | @JCStressTest
class Holder (line 210) | private static class Holder
method actor1 (line 215) | @Actor
method actor2 (line 221) | @Actor
class SetVolatileGuard (line 240) | @JCStressTest
method actor1 (line 251) | @Actor
method actor2 (line 258) | @Actor
class SetGuard (line 275) | @JCStressTest
method actor1 (line 286) | @Actor
method actor2 (line 293) | @Actor
class SetVolatileDekker (line 305) | @JCStressTest
method actor1 (line 314) | @Actor
method actor2 (line 321) | @Actor
class SetDekker (line 333) | @JCStressTest
method actor1 (line 342) | @Actor
method actor2 (line 349) | @Actor
FILE: src/jmh/java/com/lmax/disruptor/ArrayAccessBenchmark.java
class ArrayAccessBenchmark (line 36) | @SuppressWarnings("unused")
class ThreadPinningState (line 56) | @State(Scope.Thread)
method setup (line 62) | @Setup
method teardown (line 93) | @TearDown
method setup (line 116) | @Setup
method standardArrayAccess (line 129) | @Benchmark
method unsafeArrayAccess (line 135) | @Benchmark
method varHandleArrayAccess (line 141) | @Benchmark
method getterMethodHandleInvokeArrayAccess (line 147) | @Benchmark
method getterMethodHandleInvokeExactArrayAccess (line 153) | @Benchmark
method getNextSequence (line 159) | private int getNextSequence()
method main (line 164) | public static void main(final String[] args) throws RunnerException
FILE: src/jmh/java/com/lmax/disruptor/BlockingQueueBenchmark.java
class BlockingQueueBenchmark (line 26) | @BenchmarkMode(Mode.AverageTime)
method setup (line 36) | @Setup
method producing (line 62) | @Benchmark
method tearDown (line 71) | @TearDown
method main (line 77) | public static void main(final String[] args) throws RunnerException
FILE: src/jmh/java/com/lmax/disruptor/MultiProducerSequencerBenchmark.java
class MultiProducerSequencerBenchmark (line 33) | @SuppressWarnings("unused")
class ThreadPinningState (line 52) | @State(Scope.Thread)
method setup (line 58) | @Setup
method teardown (line 89) | @TearDown
class StateMultiProducerSequencerUnsafe (line 102) | @State(Scope.Group)
method read1 (line 109) | @Benchmark
method read2 (line 116) | @Benchmark
method setValue1A (line 123) | @Benchmark
method setValue1B (line 130) | @Benchmark
method setValue2A (line 137) | @Benchmark
method setValue2B (line 144) | @Benchmark
class StateMultiProducerSequencerVarHandle (line 154) | @State(Scope.Group)
method read1 (line 161) | @Benchmark
method read2 (line 168) | @Benchmark
method setValue1A (line 175) | @Benchmark
method setValue1B (line 182) | @Benchmark
method setValue2A (line 189) | @Benchmark
method setValue2B (line 196) | @Benchmark
method main (line 203) | public static void main(final String[] args) throws RunnerException
FILE: src/jmh/java/com/lmax/disruptor/MultiProducerSingleConsumer.java
class MultiProducerSingleConsumer (line 27) | @BenchmarkMode(Mode.Throughput)
method setup (line 38) | @Setup
method producing (line 52) | @Benchmark
method producingBatch (line 62) | @Benchmark
method tearDown (line 77) | @TearDown
method main (line 83) | public static void main(final String[] args) throws RunnerException
FILE: src/jmh/java/com/lmax/disruptor/RingBufferBenchmark.java
class RingBufferBenchmark (line 35) | @SuppressWarnings("ALL")
class ThreadPinningState (line 54) | @State(Scope.Thread)
method setup (line 60) | @Setup
method teardown (line 91) | @TearDown
class StateRingBufferUnsafe (line 105) | @State(Scope.Group)
method readUnsafe (line 113) | @Benchmark
method writeUnsafe (line 120) | @Benchmark
class StateRingBufferArray (line 132) | @State(Scope.Group)
method readArray (line 141) | @Benchmark
method writeArray (line 148) | @Benchmark
method main (line 155) | public static void main(final String[] args) throws RunnerException
FILE: src/jmh/java/com/lmax/disruptor/RingBufferFalseSharingBenchmark.java
class RingBufferFalseSharingBenchmark (line 27) | @BenchmarkMode(Mode.Throughput)
class HalfPaddedRingBufferWithNoisyNeighbour (line 108) | @State(Scope.Group)
method HalfPaddedRingBufferWithNoisyNeighbour (line 113) | public HalfPaddedRingBufferWithNoisyNeighbour()
method reader (line 119) | @Benchmark
method writer (line 126) | @Benchmark
class PaddedRingBuffer (line 137) | @State(Scope.Group)
method PaddedRingBuffer (line 149) | public PaddedRingBuffer()
class PaddedRingBufferWithNoisyNeighbour (line 280) | @State(Scope.Group)
method reader (line 286) | @Benchmark
method writer (line 293) | @Benchmark
method main (line 300) | public static void main(final String[] args) throws RunnerException
FILE: src/jmh/java/com/lmax/disruptor/SequenceBenchmark.java
class SequenceBenchmark (line 37) | @SuppressWarnings("ALL")
class ThreadPinningState (line 56) | @State(Scope.Thread)
method setup (line 62) | @Setup
method teardown (line 93) | @TearDown
class StateAtomic (line 108) | @State(Scope.Group)
method read1 (line 115) | @Benchmark
method read2 (line 122) | @Benchmark
method setValue1Opaque (line 129) | @Benchmark
method setValue1Volatile (line 137) | @Benchmark
method incrementValue2 (line 145) | @Benchmark
class StateSequenceUnsafe (line 159) | @State(Scope.Group)
method read1 (line 166) | @Benchmark
method read2 (line 173) | @Benchmark
method setValue1 (line 180) | @Benchmark
method setValue1Volatile (line 188) | @Benchmark
method incrementValue2 (line 196) | @Benchmark
class StateSequenceDoublePadded (line 213) | @State(Scope.Group)
method read1 (line 220) | @Benchmark
method read2 (line 227) | @Benchmark
method setValue1 (line 234) | @Benchmark
method setValue1Volatile (line 242) | @Benchmark
method incrementValue2 (line 250) | @Benchmark
class StateSequenceVarHandle (line 263) | @State(Scope.Group)
method read1 (line 270) | @Benchmark
method read2 (line 277) | @Benchmark
method setValue1 (line 284) | @Benchmark
method setValue1Volatile (line 292) | @Benchmark
method incrementValue2 (line 300) | @Benchmark
class StateSequenceVarHandleBarrier (line 313) | @State(Scope.Group)
method read1 (line 320) | @Benchmark
method read2 (line 327) | @Benchmark
method setValue1 (line 334) | @Benchmark
method setValue1Volatile (line 342) | @Benchmark
method incrementValue2 (line 350) | @Benchmark
class StateSequenceVarHandleArray (line 365) | @State(Scope.Group)
method read1 (line 372) | @Benchmark
method read2 (line 379) | @Benchmark
method setValue1 (line 386) | @Benchmark
method setValue1Volatile (line 394) | @Benchmark
method incrementValue2 (line 402) | @Benchmark
method main (line 409) | public static void main(final String[] args) throws RunnerException
FILE: src/jmh/java/com/lmax/disruptor/SingleProducerSingleConsumer.java
class SingleProducerSingleConsumer (line 26) | @BenchmarkMode(Mode.AverageTime)
method setup (line 35) | @Setup
method producing (line 49) | @Benchmark
method tearDown (line 58) | @TearDown
method main (line 64) | public static void main(final String[] args) throws RunnerException
FILE: src/jmh/java/com/lmax/disruptor/util/Constants.java
class Constants (line 3) | public class Constants
FILE: src/jmh/java/com/lmax/disruptor/util/SimpleEvent.java
class SimpleEvent (line 3) | public class SimpleEvent
method getValue (line 7) | public long getValue()
method setValue (line 12) | public void setValue(final long value)
method toString (line 17) | @Override
FILE: src/jmh/java/com/lmax/disruptor/util/SimpleEventHandler.java
class SimpleEventHandler (line 6) | public class SimpleEventHandler implements EventHandler<SimpleEvent>
method SimpleEventHandler (line 10) | public SimpleEventHandler(final Blackhole bh)
method onEvent (line 15) | @Override
FILE: src/main/java/com/lmax/disruptor/AbstractSequencer.java
class AbstractSequencer (line 28) | public abstract class AbstractSequencer implements Sequencer
method AbstractSequencer (line 44) | public AbstractSequencer(final int bufferSize, final WaitStrategy wait...
method getCursor (line 62) | @Override
method getBufferSize (line 71) | @Override
method addGatingSequences (line 80) | @Override
method removeGatingSequence (line 89) | @Override
method getMinimumSequence (line 98) | @Override
method newBarrier (line 107) | @Override
method newPoller (line 121) | @Override
method toString (line 127) | @Override
FILE: src/main/java/com/lmax/disruptor/AggregateEventHandler.java
class AggregateEventHandler (line 23) | public final class AggregateEventHandler<T>
method AggregateEventHandler (line 33) | @SafeVarargs
method onEvent (line 39) | @Override
method onStart (line 49) | @Override
method onShutdown (line 58) | @Override
FILE: src/main/java/com/lmax/disruptor/AlertException.java
class AlertException (line 23) | @SuppressWarnings({"serial", "lgtm[java/non-sync-override]"})
method AlertException (line 34) | private AlertException()
method fillInStackTrace (line 43) | @Override
FILE: src/main/java/com/lmax/disruptor/BatchEventProcessor.java
class BatchEventProcessor (line 30) | public final class BatchEventProcessor<T>
method BatchEventProcessor (line 47) | BatchEventProcessor(
method getSequence (line 70) | @Override
method halt (line 76) | @Override
method isRunning (line 83) | @Override
method setExceptionHandler (line 94) | public void setExceptionHandler(final ExceptionHandler<? super T> exce...
method run (line 109) | @Override
method processEvents (line 144) | private void processEvents()
method earlyExit (line 200) | private void earlyExit()
method notifyTimeout (line 206) | private void notifyTimeout(final long availableSequence)
method notifyStart (line 221) | private void notifyStart()
method notifyShutdown (line 236) | private void notifyShutdown()
method handleEventException (line 252) | private void handleEventException(final Throwable ex, final long seque...
method handleOnStartException (line 261) | private void handleOnStartException(final Throwable ex)
method handleOnShutdownException (line 270) | private void handleOnShutdownException(final Throwable ex)
method getExceptionHandler (line 275) | private ExceptionHandler<? super T> getExceptionHandler()
class TryRewindHandler (line 281) | private class TryRewindHandler implements RewindHandler
method TryRewindHandler (line 285) | TryRewindHandler(final BatchRewindStrategy batchRewindStrategy)
method attemptRewindGetNextSequence (line 290) | @Override
class NoRewindHandler (line 305) | private static class NoRewindHandler implements RewindHandler
method attemptRewindGetNextSequence (line 307) | @Override
FILE: src/main/java/com/lmax/disruptor/BatchEventProcessorBuilder.java
class BatchEventProcessorBuilder (line 19) | public final class BatchEventProcessorBuilder
method setMaxBatchSize (line 29) | public BatchEventProcessorBuilder setMaxBatchSize(final int maxBatchSize)
method build (line 48) | public <T> BatchEventProcessor<T> build(
method build (line 72) | public <T> BatchEventProcessor<T> build(
FILE: src/main/java/com/lmax/disruptor/BatchRewindStrategy.java
type BatchRewindStrategy (line 6) | public interface BatchRewindStrategy
method handleRewindException (line 16) | RewindAction handleRewindException(RewindableException e, int attempts);
FILE: src/main/java/com/lmax/disruptor/BlockingWaitStrategy.java
class BlockingWaitStrategy (line 24) | public final class BlockingWaitStrategy implements WaitStrategy
method waitFor (line 28) | @Override
method signalAllWhenBlocking (line 54) | @Override
method toString (line 63) | @Override
FILE: src/main/java/com/lmax/disruptor/BusySpinWaitStrategy.java
class BusySpinWaitStrategy (line 24) | public final class BusySpinWaitStrategy implements WaitStrategy
method waitFor (line 26) | @Override
method signalAllWhenBlocking (line 42) | @Override
FILE: src/main/java/com/lmax/disruptor/Cursored.java
type Cursored (line 24) | public interface Cursored
method getCursor (line 31) | long getCursor();
FILE: src/main/java/com/lmax/disruptor/DataProvider.java
type DataProvider (line 23) | public interface DataProvider<T>
method get (line 29) | T get(long sequence);
FILE: src/main/java/com/lmax/disruptor/EventFactory.java
type EventFactory (line 23) | public interface EventFactory<T>
method newInstance (line 30) | T newInstance();
FILE: src/main/java/com/lmax/disruptor/EventHandler.java
type EventHandler (line 24) | public interface EventHandler<T> extends EventHandlerBase<T>
method onEvent (line 39) | @Override
method setSequenceCallback (line 52) | default void setSequenceCallback(Sequence sequenceCallback)
FILE: src/main/java/com/lmax/disruptor/EventHandlerBase.java
type EventHandlerBase (line 18) | @FunctionalInterface
method onEvent (line 35) | void onEvent(T event, long sequence, boolean endOfBatch) throws Throwa...
method onBatchStart (line 43) | default void onBatchStart(long batchSize, long queueDepth)
method onStart (line 50) | default void onStart()
method onShutdown (line 60) | default void onShutdown()
method onTimeout (line 70) | default void onTimeout(long sequence) throws Exception
FILE: src/main/java/com/lmax/disruptor/EventHandlerIdentity.java
type EventHandlerIdentity (line 3) | public interface EventHandlerIdentity
FILE: src/main/java/com/lmax/disruptor/EventPoller.java
class EventPoller (line 11) | public class EventPoller<T>
type Handler (line 23) | public interface Handler<T>
method onEvent (line 35) | boolean onEvent(T event, long sequence, boolean endOfBatch) throws E...
type PollState (line 41) | public enum PollState
method EventPoller (line 66) | public EventPoller(
method poll (line 91) | public PollState poll(final Handler<T> eventHandler) throws Exception
method newInstance (line 143) | public static <T> EventPoller<T> newInstance(
method getSequence (line 172) | public Sequence getSequence()
FILE: src/main/java/com/lmax/disruptor/EventProcessor.java
type EventProcessor (line 26) | public interface EventProcessor extends Runnable
method getSequence (line 33) | Sequence getSequence();
method halt (line 39) | void halt();
method isRunning (line 45) | boolean isRunning();
FILE: src/main/java/com/lmax/disruptor/EventSequencer.java
type EventSequencer (line 7) | public interface EventSequencer<T> extends DataProvider<T>, Sequenced
FILE: src/main/java/com/lmax/disruptor/EventSink.java
type EventSink (line 7) | public interface EventSink<E>
method publishEvent (line 17) | void publishEvent(EventTranslator<E> translator);
method tryPublishEvent (line 30) | boolean tryPublishEvent(EventTranslator<E> translator);
method publishEvent (line 40) | <A> void publishEvent(EventTranslatorOneArg<E, A> translator, A arg0);
method tryPublishEvent (line 52) | <A> boolean tryPublishEvent(EventTranslatorOneArg<E, A> translator, A ...
method publishEvent (line 64) | <A, B> void publishEvent(EventTranslatorTwoArg<E, A, B> translator, A ...
method tryPublishEvent (line 78) | <A, B> boolean tryPublishEvent(EventTranslatorTwoArg<E, A, B> translat...
method publishEvent (line 92) | <A, B, C> void publishEvent(EventTranslatorThreeArg<E, A, B, C> transl...
method tryPublishEvent (line 108) | <A, B, C> boolean tryPublishEvent(EventTranslatorThreeArg<E, A, B, C> ...
method publishEvent (line 117) | void publishEvent(EventTranslatorVararg<E> translator, Object... args);
method tryPublishEvent (line 128) | boolean tryPublishEvent(EventTranslatorVararg<E> translator, Object......
method publishEvents (line 143) | void publishEvents(EventTranslator<E>[] translators);
method publishEvents (line 160) | void publishEvents(EventTranslator<E>[] translators, int batchStartsAt...
method tryPublishEvents (line 173) | boolean tryPublishEvents(EventTranslator<E>[] translators);
method tryPublishEvents (line 188) | boolean tryPublishEvents(EventTranslator<E>[] translators, int batchSt...
method publishEvents (line 198) | <A> void publishEvents(EventTranslatorOneArg<E, A> translator, A[] arg0);
method publishEvents (line 210) | <A> void publishEvents(EventTranslatorOneArg<E, A> translator, int bat...
method tryPublishEvents (line 222) | <A> boolean tryPublishEvents(EventTranslatorOneArg<E, A> translator, A...
method tryPublishEvents (line 236) | <A> boolean tryPublishEvents(EventTranslatorOneArg<E, A> translator, i...
method publishEvents (line 248) | <A, B> void publishEvents(EventTranslatorTwoArg<E, A, B> translator, A...
method publishEvents (line 262) | <A, B> void publishEvents(
method tryPublishEvents (line 278) | <A, B> boolean tryPublishEvents(EventTranslatorTwoArg<E, A, B> transla...
method tryPublishEvents (line 294) | <A, B> boolean tryPublishEvents(
method publishEvents (line 310) | <A, B, C> void publishEvents(EventTranslatorThreeArg<E, A, B, C> trans...
method publishEvents (line 326) | <A, B, C> void publishEvents(
method tryPublishEvents (line 344) | <A, B, C> boolean tryPublishEvents(EventTranslatorThreeArg<E, A, B, C>...
method tryPublishEvents (line 362) | <A, B, C> boolean tryPublishEvents(
method publishEvents (line 373) | void publishEvents(EventTranslatorVararg<E> translator, Object[]... ar...
method publishEvents (line 384) | void publishEvents(EventTranslatorVararg<E> translator, int batchStart...
method tryPublishEvents (line 395) | boolean tryPublishEvents(EventTranslatorVararg<E> translator, Object[]...
method tryPublishEvents (line 408) | boolean tryPublishEvents(EventTranslatorVararg<E> translator, int batc...
FILE: src/main/java/com/lmax/disruptor/EventTranslator.java
type EventTranslator (line 27) | public interface EventTranslator<T>
method translateTo (line 35) | void translateTo(T event, long sequence);
FILE: src/main/java/com/lmax/disruptor/EventTranslatorOneArg.java
type EventTranslatorOneArg (line 25) | public interface EventTranslatorOneArg<T, A>
method translateTo (line 34) | void translateTo(T event, long sequence, A arg0);
FILE: src/main/java/com/lmax/disruptor/EventTranslatorThreeArg.java
type EventTranslatorThreeArg (line 27) | public interface EventTranslatorThreeArg<T, A, B, C>
method translateTo (line 38) | void translateTo(T event, long sequence, A arg0, B arg1, C arg2);
FILE: src/main/java/com/lmax/disruptor/EventTranslatorTwoArg.java
type EventTranslatorTwoArg (line 26) | public interface EventTranslatorTwoArg<T, A, B>
method translateTo (line 36) | void translateTo(T event, long sequence, A arg0, B arg1);
FILE: src/main/java/com/lmax/disruptor/EventTranslatorVararg.java
type EventTranslatorVararg (line 24) | public interface EventTranslatorVararg<T>
method translateTo (line 33) | void translateTo(T event, long sequence, Object... args);
FILE: src/main/java/com/lmax/disruptor/EventuallyGiveUpBatchRewindStrategy.java
class EventuallyGiveUpBatchRewindStrategy (line 7) | public class EventuallyGiveUpBatchRewindStrategy implements BatchRewindS...
method EventuallyGiveUpBatchRewindStrategy (line 14) | public EventuallyGiveUpBatchRewindStrategy(final long maxAttempts)
method handleRewindException (line 19) | @Override
FILE: src/main/java/com/lmax/disruptor/ExceptionHandler.java
type ExceptionHandler (line 23) | public interface ExceptionHandler<T>
method handleEventException (line 35) | void handleEventException(Throwable ex, long sequence, T event);
method handleOnStartException (line 42) | void handleOnStartException(Throwable ex);
method handleOnShutdownException (line 49) | void handleOnShutdownException(Throwable ex);
FILE: src/main/java/com/lmax/disruptor/ExceptionHandlers.java
class ExceptionHandlers (line 19) | public final class ExceptionHandlers
method defaultHandler (line 27) | public static ExceptionHandler<Object> defaultHandler()
method ExceptionHandlers (line 32) | private ExceptionHandlers()
class DefaultExceptionHandlerHolder (line 39) | private static final class DefaultExceptionHandlerHolder
FILE: src/main/java/com/lmax/disruptor/FatalExceptionHandler.java
class FatalExceptionHandler (line 26) | public final class FatalExceptionHandler implements ExceptionHandler<Obj...
method handleEventException (line 30) | @Override
method handleOnStartException (line 38) | @Override
method handleOnShutdownException (line 44) | @Override
FILE: src/main/java/com/lmax/disruptor/FixedSequenceGroup.java
class FixedSequenceGroup (line 25) | public final class FixedSequenceGroup extends Sequence
method FixedSequenceGroup (line 34) | public FixedSequenceGroup(final Sequence[] sequences)
method get (line 44) | @Override
method toString (line 50) | @Override
method set (line 59) | @Override
method compareAndSet (line 68) | @Override
method incrementAndGet (line 77) | @Override
method addAndGet (line 86) | @Override
FILE: src/main/java/com/lmax/disruptor/IgnoreExceptionHandler.java
class IgnoreExceptionHandler (line 25) | public final class IgnoreExceptionHandler implements ExceptionHandler<Ob...
method handleEventException (line 29) | @Override
method handleOnStartException (line 35) | @Override
method handleOnShutdownException (line 41) | @Override
FILE: src/main/java/com/lmax/disruptor/InsufficientCapacityException.java
class InsufficientCapacityException (line 25) | @SuppressWarnings({"serial", "lgtm[java/non-sync-override]"})
method InsufficientCapacityException (line 33) | private InsufficientCapacityException()
method fillInStackTrace (line 38) | @Override
FILE: src/main/java/com/lmax/disruptor/LiteBlockingWaitStrategy.java
class LiteBlockingWaitStrategy (line 26) | public final class LiteBlockingWaitStrategy implements WaitStrategy
method waitFor (line 31) | @Override
method signalAllWhenBlocking (line 65) | @Override
method toString (line 77) | @Override
FILE: src/main/java/com/lmax/disruptor/LiteTimeoutBlockingWaitStrategy.java
class LiteTimeoutBlockingWaitStrategy (line 12) | public class LiteTimeoutBlockingWaitStrategy implements WaitStrategy
method LiteTimeoutBlockingWaitStrategy (line 22) | public LiteTimeoutBlockingWaitStrategy(final long timeout, final TimeU...
method waitFor (line 27) | @Override
method signalAllWhenBlocking (line 64) | @Override
method toString (line 76) | @Override
FILE: src/main/java/com/lmax/disruptor/MultiProducerSequencer.java
class MultiProducerSequencer (line 34) | public final class MultiProducerSequencer extends AbstractSequencer
method MultiProducerSequencer (line 52) | public MultiProducerSequencer(final int bufferSize, final WaitStrategy...
method hasAvailableCapacity (line 65) | @Override
method hasAvailableCapacity (line 71) | private boolean hasAvailableCapacity(final Sequence[] gatingSequences,...
method claim (line 93) | @Override
method next (line 102) | @Override
method next (line 111) | @Override
method tryNext (line 142) | @Override
method tryNext (line 151) | @Override
method remainingCapacity (line 180) | @Override
method publish (line 191) | @Override
method publish (line 201) | @Override
method setAvailable (line 230) | private void setAvailable(final long sequence)
method setAvailableBufferValue (line 235) | private void setAvailableBufferValue(final int index, final int flag)
method isAvailable (line 243) | @Override
method getHighestPublishedSequence (line 251) | @Override
method calculateAvailabilityFlag (line 265) | private int calculateAvailabilityFlag(final long sequence)
method calculateIndex (line 270) | private int calculateIndex(final long sequence)
method toString (line 275) | @Override
FILE: src/main/java/com/lmax/disruptor/NanosecondPauseBatchRewindStrategy.java
class NanosecondPauseBatchRewindStrategy (line 8) | public class NanosecondPauseBatchRewindStrategy implements BatchRewindSt...
method NanosecondPauseBatchRewindStrategy (line 17) | public NanosecondPauseBatchRewindStrategy(final long nanoSecondPauseTime)
method handleRewindException (line 22) | @Override
FILE: src/main/java/com/lmax/disruptor/NoOpEventProcessor.java
class NoOpEventProcessor (line 25) | public final class NoOpEventProcessor implements EventProcessor
method NoOpEventProcessor (line 35) | public NoOpEventProcessor(final RingBuffer<?> sequencer)
method getSequence (line 40) | @Override
method halt (line 46) | @Override
method isRunning (line 52) | @Override
method run (line 58) | @Override
class SequencerFollowingSequence (line 70) | private static final class SequencerFollowingSequence extends Sequence
method SequencerFollowingSequence (line 74) | private SequencerFollowingSequence(final RingBuffer<?> sequencer)
method get (line 80) | @Override
FILE: src/main/java/com/lmax/disruptor/PhasedBackoffWaitStrategy.java
class PhasedBackoffWaitStrategy (line 26) | public final class PhasedBackoffWaitStrategy implements WaitStrategy
method PhasedBackoffWaitStrategy (line 40) | public PhasedBackoffWaitStrategy(
method withLock (line 59) | public static PhasedBackoffWaitStrategy withLock(
method withLiteLock (line 77) | public static PhasedBackoffWaitStrategy withLiteLock(
method withSleep (line 95) | public static PhasedBackoffWaitStrategy withSleep(
method waitFor (line 105) | @Override
method signalAllWhenBlocking (line 144) | @Override
FILE: src/main/java/com/lmax/disruptor/ProcessingSequenceBarrier.java
class ProcessingSequenceBarrier (line 23) | final class ProcessingSequenceBarrier implements SequenceBarrier
method ProcessingSequenceBarrier (line 31) | ProcessingSequenceBarrier(
method waitFor (line 50) | @Override
method getCursor (line 66) | @Override
method isAlerted (line 72) | @Override
method alert (line 78) | @Override
method clearAlert (line 85) | @Override
method checkAlert (line 91) | @Override
FILE: src/main/java/com/lmax/disruptor/RewindAction.java
type RewindAction (line 6) | public enum RewindAction
FILE: src/main/java/com/lmax/disruptor/RewindHandler.java
type RewindHandler (line 19) | public interface RewindHandler
method attemptRewindGetNextSequence (line 21) | long attemptRewindGetNextSequence(RewindableException e, long startOfB...
FILE: src/main/java/com/lmax/disruptor/RewindableEventHandler.java
type RewindableEventHandler (line 25) | public interface RewindableEventHandler<T> extends EventHandlerBase<T>
method onEvent (line 41) | @Override
FILE: src/main/java/com/lmax/disruptor/RewindableException.java
class RewindableException (line 8) | public class RewindableException extends Throwable
method RewindableException (line 13) | public RewindableException(final Throwable cause)
FILE: src/main/java/com/lmax/disruptor/RingBuffer.java
class RingBufferPad (line 21) | abstract class RingBufferPad
class RingBufferFields (line 33) | abstract class RingBufferFields<E> extends RingBufferPad
method RingBufferFields (line 42) | @SuppressWarnings("unchecked")
method fill (line 64) | private void fill(final EventFactory<E> eventFactory)
method elementAt (line 72) | protected final E elementAt(final long sequence)
class RingBuffer (line 84) | public final class RingBuffer<E> extends RingBufferFields<E> implements ...
method RingBuffer (line 106) | RingBuffer(
method createMultiProducer (line 124) | public static <E> RingBuffer<E> createMultiProducer(
method createMultiProducer (line 144) | public static <E> RingBuffer<E> createMultiProducer(final EventFactory...
method createSingleProducer (line 160) | public static <E> RingBuffer<E> createSingleProducer(
method createSingleProducer (line 180) | public static <E> RingBuffer<E> createSingleProducer(final EventFactor...
method create (line 196) | public static <E> RingBuffer<E> create(
method get (line 228) | @Override
method next (line 251) | @Override
method next (line 265) | @Override
method tryNext (line 291) | @Override
method tryNext (line 305) | @Override
method claimAndGetPreallocated (line 318) | public E claimAndGetPreallocated(final long sequence)
method isAvailable (line 347) | public boolean isAvailable(final long sequence)
method addGatingSequences (line 358) | public void addGatingSequences(final Sequence... gatingSequences)
method getMinimumGatingSequence (line 370) | public long getMinimumGatingSequence()
method removeGatingSequence (line 381) | public boolean removeGatingSequence(final Sequence sequence)
method newBarrier (line 394) | public SequenceBarrier newBarrier(final Sequence... sequencesToTrack)
method newPoller (line 405) | public EventPoller<E> newPoller(final Sequence... gatingSequences)
method getCursor (line 417) | @Override
method getBufferSize (line 428) | @Override
method hasAvailableCapacity (line 444) | @Override
method publishEvent (line 454) | @Override
method tryPublishEvent (line 464) | @Override
method publishEvent (line 483) | @Override
method tryPublishEvent (line 494) | @Override
method publishEvent (line 513) | @Override
method tryPublishEvent (line 524) | @Override
method publishEvent (line 543) | @Override
method tryPublishEvent (line 554) | @Override
method publishEvent (line 572) | @Override
method tryPublishEvent (line 582) | @Override
method publishEvents (line 601) | @Override
method publishEvents (line 610) | @Override
method tryPublishEvents (line 621) | @Override
method tryPublishEvents (line 630) | @Override
method publishEvents (line 650) | @Override
method publishEvents (line 660) | @Override
method tryPublishEvents (line 672) | @Override
method tryPublishEvents (line 682) | @Override
method publishEvents (line 703) | @Override
method publishEvents (line 713) | @Override
method tryPublishEvents (line 726) | @Override
method tryPublishEvents (line 736) | @Override
method publishEvents (line 757) | @Override
method publishEvents (line 767) | @Override
method tryPublishEvents (line 780) | @Override
method tryPublishEvents (line 791) | @Override
method publishEvents (line 811) | @Override
method publishEvents (line 820) | @Override
method tryPublishEvents (line 831) | @Override
method tryPublishEvents (line 840) | @Override
method publish (line 863) | @Override
method publish (line 877) | @Override
method remainingCapacity (line 888) | @Override
method checkBounds (line 894) | private void checkBounds(final EventTranslator<E>[] translators, final...
method checkBatchSizing (line 900) | private void checkBatchSizing(final int batchStartsAt, final int batch...
method checkBounds (line 912) | private <A> void checkBounds(final A[] arg0, final int batchStartsAt, ...
method checkBounds (line 918) | private <A, B> void checkBounds(final A[] arg0, final B[] arg1, final ...
method checkBounds (line 925) | private <A, B, C> void checkBounds(
method checkBounds (line 934) | private void checkBounds(final int batchStartsAt, final int batchSize,...
method batchOverRuns (line 940) | private <A> void batchOverRuns(final A[] arg0, final int batchStartsAt...
method translateAndPublish (line 951) | private void translateAndPublish(final EventTranslator<E> translator, ...
method translateAndPublish (line 963) | private <A> void translateAndPublish(final EventTranslatorOneArg<E, A>...
method translateAndPublish (line 975) | private <A, B> void translateAndPublish(final EventTranslatorTwoArg<E,...
method translateAndPublish (line 987) | private <A, B, C> void translateAndPublish(
method translateAndPublish (line 1001) | private void translateAndPublish(final EventTranslatorVararg<E> transl...
method translateAndPublishBatch (line 1013) | private void translateAndPublishBatch(
method translateAndPublishBatch (line 1034) | private <A> void translateAndPublishBatch(
method translateAndPublishBatch (line 1054) | private <A, B> void translateAndPublishBatch(
method translateAndPublishBatch (line 1075) | private <A, B, C> void translateAndPublishBatch(
method translateAndPublishBatch (line 1096) | private void translateAndPublishBatch(
method toString (line 1116) | @Override
FILE: src/main/java/com/lmax/disruptor/Sequence.java
class LhsPadding (line 7) | class LhsPadding
class Value (line 19) | class Value extends LhsPadding
class RhsPadding (line 24) | class RhsPadding extends Value
class Sequence (line 44) | public class Sequence extends RhsPadding
method Sequence (line 65) | public Sequence()
method Sequence (line 75) | public Sequence(final long initialValue)
method get (line 86) | public long get()
method set (line 100) | public void set(final long value)
method setVolatile (line 114) | public void setVolatile(final long value)
method compareAndSet (line 128) | public boolean compareAndSet(final long expectedValue, final long newV...
method incrementAndGet (line 138) | public long incrementAndGet()
method addAndGet (line 149) | public long addAndGet(final long increment)
method getAndAdd (line 160) | public long getAndAdd(final long increment)
method toString (line 165) | @Override
FILE: src/main/java/com/lmax/disruptor/SequenceBarrier.java
type SequenceBarrier (line 23) | public interface SequenceBarrier
method waitFor (line 34) | long waitFor(long sequence) throws AlertException, InterruptedExceptio...
method getCursor (line 41) | long getCursor();
method isAlerted (line 48) | boolean isAlerted();
method alert (line 53) | void alert();
method clearAlert (line 58) | void clearAlert();
method checkAlert (line 65) | void checkAlert() throws AlertException;
FILE: src/main/java/com/lmax/disruptor/SequenceGroup.java
class SequenceGroup (line 29) | public final class SequenceGroup extends Sequence
method SequenceGroup (line 38) | public SequenceGroup()
method get (line 48) | @Override
method set (line 59) | @Override
method add (line 76) | public void add(final Sequence sequence)
method remove (line 97) | public boolean remove(final Sequence sequence)
method size (line 107) | public int size()
method addWhileRunning (line 121) | public void addWhileRunning(final Cursored cursored, final Sequence se...
FILE: src/main/java/com/lmax/disruptor/SequenceGroups.java
class SequenceGroups (line 25) | class SequenceGroups
method addSequences (line 27) | static <T> void addSequences(
method removeSequence (line 59) | static <T> boolean removeSequence(
method countMatching (line 96) | private static <T> int countMatching(final T[] values, final T toMatch)
FILE: src/main/java/com/lmax/disruptor/Sequenced.java
type Sequenced (line 7) | public interface Sequenced
method getBufferSize (line 14) | int getBufferSize();
method hasAvailableCapacity (line 23) | boolean hasAvailableCapacity(int requiredCapacity);
method remainingCapacity (line 30) | long remainingCapacity();
method next (line 37) | long next();
method next (line 55) | long next(int n);
method tryNext (line 65) | long tryNext() throws InsufficientCapacityException;
method tryNext (line 77) | long tryNext(int n) throws InsufficientCapacityException;
method publish (line 84) | void publish(long sequence);
method publish (line 92) | void publish(long lo, long hi);
FILE: src/main/java/com/lmax/disruptor/Sequencer.java
type Sequencer (line 21) | public interface Sequencer extends Cursored, Sequenced
method claim (line 34) | void claim(long sequence);
method isAvailable (line 42) | boolean isAvailable(long sequence);
method addGatingSequences (line 50) | void addGatingSequences(Sequence... gatingSequences);
method removeGatingSequence (line 58) | boolean removeGatingSequence(Sequence sequence);
method newBarrier (line 68) | SequenceBarrier newBarrier(Sequence... sequencesToTrack);
method getMinimumSequence (line 77) | long getMinimumSequence();
method getHighestPublishedSequence (line 91) | long getHighestPublishedSequence(long nextSequence, long availableSequ...
method newPoller (line 101) | <T> EventPoller<T> newPoller(DataProvider<T> provider, Sequence... gat...
FILE: src/main/java/com/lmax/disruptor/SimpleBatchRewindStrategy.java
class SimpleBatchRewindStrategy (line 6) | public class SimpleBatchRewindStrategy implements BatchRewindStrategy
method handleRewindException (line 8) | @Override
FILE: src/main/java/com/lmax/disruptor/SingleProducerSequencer.java
class SingleProducerSequencerPad (line 25) | abstract class SingleProducerSequencerPad extends AbstractSequencer
method SingleProducerSequencerPad (line 36) | SingleProducerSequencerPad(final int bufferSize, final WaitStrategy wa...
class SingleProducerSequencerFields (line 42) | abstract class SingleProducerSequencerFields extends SingleProducerSeque...
method SingleProducerSequencerFields (line 44) | SingleProducerSequencerFields(final int bufferSize, final WaitStrategy...
class SingleProducerSequencer (line 64) | public final class SingleProducerSequencer extends SingleProducerSequenc...
method SingleProducerSequencer (line 81) | public SingleProducerSequencer(final int bufferSize, final WaitStrateg...
method hasAvailableCapacity (line 89) | @Override
method hasAvailableCapacity (line 95) | private boolean hasAvailableCapacity(final int requiredCapacity, final...
method next (line 124) | @Override
method next (line 133) | @Override
method tryNext (line 170) | @Override
method tryNext (line 179) | @Override
method remainingCapacity (line 200) | @Override
method claim (line 213) | @Override
method publish (line 222) | @Override
method publish (line 232) | @Override
method isAvailable (line 241) | @Override
method getHighestPublishedSequence (line 248) | @Override
method toString (line 254) | @Override
method sameThread (line 265) | private boolean sameThread()
class ProducerThreadAssertion (line 273) | private static class ProducerThreadAssertion
method isSameThreadProducingTo (line 283) | public static boolean isSameThreadProducingTo(final SingleProducerSe...
FILE: src/main/java/com/lmax/disruptor/SleepingWaitStrategy.java
class SleepingWaitStrategy (line 31) | public final class SleepingWaitStrategy implements WaitStrategy
method SleepingWaitStrategy (line 43) | public SleepingWaitStrategy()
method SleepingWaitStrategy (line 51) | public SleepingWaitStrategy(final int retries)
method SleepingWaitStrategy (line 60) | public SleepingWaitStrategy(final int retries, final long sleepTimeNs)
method waitFor (line 66) | @Override
method signalAllWhenBlocking (line 82) | @Override
method applyWaitMethod (line 87) | private int applyWaitMethod(final SequenceBarrier barrier, final int c...
FILE: src/main/java/com/lmax/disruptor/TimeoutBlockingWaitStrategy.java
class TimeoutBlockingWaitStrategy (line 15) | public class TimeoutBlockingWaitStrategy implements WaitStrategy
method TimeoutBlockingWaitStrategy (line 24) | public TimeoutBlockingWaitStrategy(final long timeout, final TimeUnit ...
method waitFor (line 29) | @Override
method signalAllWhenBlocking (line 64) | @Override
method toString (line 73) | @Override
FILE: src/main/java/com/lmax/disruptor/TimeoutException.java
class TimeoutException (line 8) | @SuppressWarnings({"serial", "lgtm[java/non-sync-override]"})
method TimeoutException (line 16) | private TimeoutException()
method fillInStackTrace (line 21) | @Override
FILE: src/main/java/com/lmax/disruptor/WaitStrategy.java
type WaitStrategy (line 22) | public interface WaitStrategy
method waitFor (line 41) | long waitFor(long sequence, Sequence cursor, Sequence dependentSequenc...
method signalAllWhenBlocking (line 47) | void signalAllWhenBlocking();
FILE: src/main/java/com/lmax/disruptor/YieldingWaitStrategy.java
class YieldingWaitStrategy (line 26) | public final class YieldingWaitStrategy implements WaitStrategy
method waitFor (line 30) | @Override
method signalAllWhenBlocking (line 46) | @Override
method applyWaitMethod (line 51) | private int applyWaitMethod(final SequenceBarrier barrier, final int c...
FILE: src/main/java/com/lmax/disruptor/dsl/ConsumerInfo.java
type ConsumerInfo (line 8) | interface ConsumerInfo
method getSequences (line 10) | Sequence[] getSequences();
method getBarrier (line 12) | SequenceBarrier getBarrier();
method isEndOfChain (line 14) | boolean isEndOfChain();
method start (line 16) | void start(ThreadFactory threadFactory);
method halt (line 18) | void halt();
method markAsUsedInBarrier (line 20) | void markAsUsedInBarrier();
method isRunning (line 22) | boolean isRunning();
FILE: src/main/java/com/lmax/disruptor/dsl/ConsumerRepository.java
class ConsumerRepository (line 33) | class ConsumerRepository
method add (line 41) | public void add(
method add (line 52) | public void add(final EventProcessor processor)
method startAll (line 59) | public void startAll(final ThreadFactory threadFactory)
method haltAll (line 64) | public void haltAll()
method hasBacklog (line 69) | public boolean hasBacklog(final long cursor, final boolean includeStop...
method getEventProcessorFor (line 89) | public EventProcessor getEventProcessorFor(final EventHandlerIdentity ...
method getSequenceFor (line 100) | public Sequence getSequenceFor(final EventHandlerIdentity handlerIdent...
method unMarkEventProcessorsAsEndOfChain (line 105) | public void unMarkEventProcessorsAsEndOfChain(final Sequence... barrie...
method getBarrierFor (line 113) | public SequenceBarrier getBarrierFor(final EventHandlerIdentity handle...
method getEventProcessorInfo (line 119) | private EventProcessorInfo getEventProcessorInfo(final EventHandlerIde...
method getEventProcessorInfo (line 124) | private ConsumerInfo getEventProcessorInfo(final Sequence barrierEvent...
FILE: src/main/java/com/lmax/disruptor/dsl/Disruptor.java
class Disruptor (line 62) | public class Disruptor<T>
method Disruptor (line 78) | public Disruptor(final EventFactory<T> eventFactory, final int ringBuf...
method Disruptor (line 92) | public Disruptor(
method Disruptor (line 107) | private Disruptor(final RingBuffer<T> ringBuffer, final ThreadFactory ...
method handleEventsWith (line 126) | @SuppressWarnings("varargs")
method handleEventsWith (line 147) | @SuppressWarnings("varargs")
method handleEventsWith (line 173) | @SafeVarargs
method handleEventsWith (line 191) | public EventHandlerGroup<T> handleEventsWith(final EventProcessor... p...
method handleExceptionsWith (line 214) | @Deprecated
method setDefaultExceptionHandler (line 227) | @SuppressWarnings("unchecked")
method handleExceptionsFor (line 245) | public ExceptionHandlerSetting<T> handleExceptionsFor(final EventHandl...
method after (line 260) | public final EventHandlerGroup<T> after(final EventHandlerIdentity... ...
method after (line 279) | public EventHandlerGroup<T> after(final EventProcessor... processors)
method publishEvent (line 289) | public void publishEvent(final EventTranslator<T> eventTranslator)
method publishEvent (line 301) | public <A> void publishEvent(final EventTranslatorOneArg<T, A> eventTr...
method publishEvents (line 313) | public <A> void publishEvents(final EventTranslatorOneArg<T, A> eventT...
method publishEvent (line 327) | public <A, B> void publishEvent(final EventTranslatorTwoArg<T, A, B> e...
method publishEvent (line 343) | public <A, B, C> void publishEvent(final EventTranslatorThreeArg<T, A,...
method start (line 358) | public RingBuffer<T> start()
method halt (line 369) | public void halt()
method shutdown (line 382) | public void shutdown()
method shutdown (line 405) | public void shutdown(final long timeout, final TimeUnit timeUnit) thro...
method getRingBuffer (line 425) | public RingBuffer<T> getRingBuffer()
method getCursor (line 435) | public long getCursor()
method getBufferSize (line 446) | public long getBufferSize()
method get (line 458) | public T get(final long sequence)
method getBarrierFor (line 470) | public SequenceBarrier getBarrierFor(final EventHandlerIdentity handler)
method getSequenceValueFor (line 481) | public long getSequenceValueFor(final EventHandlerIdentity handler)
method hasBacklog (line 489) | private boolean hasBacklog()
method hasStarted (line 501) | public boolean hasStarted()
method createEventProcessors (line 506) | EventHandlerGroup<T> createEventProcessors(
method createEventProcessors (line 536) | EventHandlerGroup<T> createEventProcessors(
method updateGatingSequencesForNextInChain (line 567) | private void updateGatingSequencesForNextInChain(final Sequence[] barr...
method createEventProcessors (line 580) | EventHandlerGroup<T> createEventProcessors(
method checkNotStarted (line 592) | private void checkNotStarted()
method checkOnlyStartedOnce (line 600) | private void checkOnlyStartedOnce()
method toString (line 608) | @Override
FILE: src/main/java/com/lmax/disruptor/dsl/EventHandlerGroup.java
class EventHandlerGroup (line 33) | public class EventHandlerGroup<T>
method EventHandlerGroup (line 39) | EventHandlerGroup(
method and (line 55) | public EventHandlerGroup<T> and(final EventHandlerGroup<T> otherHandle...
method and (line 71) | public EventHandlerGroup<T> and(final EventProcessor... processors)
method then (line 97) | @SafeVarargs
method then (line 116) | @SafeVarargs
method then (line 133) | @SafeVarargs
method handleEventsWith (line 151) | @SafeVarargs
method handleEventsWith (line 170) | @SafeVarargs
method handleEventsWith (line 189) | @SafeVarargs
method asSequenceBarrier (line 202) | public SequenceBarrier asSequenceBarrier()
FILE: src/main/java/com/lmax/disruptor/dsl/EventProcessorFactory.java
type EventProcessorFactory (line 16) | public interface EventProcessorFactory<T>
method createEventProcessor (line 25) | EventProcessor createEventProcessor(RingBuffer<T> ringBuffer, Sequence...
FILE: src/main/java/com/lmax/disruptor/dsl/EventProcessorInfo.java
class EventProcessorInfo (line 30) | class EventProcessorInfo implements ConsumerInfo
method EventProcessorInfo (line 36) | EventProcessorInfo(final EventProcessor eventprocessor, final Sequence...
method getEventProcessor (line 42) | public EventProcessor getEventProcessor()
method getSequences (line 47) | @Override
method getBarrier (line 53) | @Override
method isEndOfChain (line 59) | @Override
method start (line 65) | @Override
method halt (line 77) | @Override
method markAsUsedInBarrier (line 86) | @Override
method isRunning (line 92) | @Override
FILE: src/main/java/com/lmax/disruptor/dsl/ExceptionHandlerSetting.java
class ExceptionHandlerSetting (line 30) | public class ExceptionHandlerSetting<T>
method ExceptionHandlerSetting (line 35) | ExceptionHandlerSetting(
method with (line 48) | @SuppressWarnings("unchecked")
FILE: src/main/java/com/lmax/disruptor/dsl/ExceptionHandlerWrapper.java
class ExceptionHandlerWrapper (line 10) | public class ExceptionHandlerWrapper<T> implements ExceptionHandler<T>
method switchTo (line 18) | public void switchTo(final ExceptionHandler<? super T> exceptionHandler)
method handleEventException (line 23) | @Override
method handleOnStartException (line 29) | @Override
method handleOnShutdownException (line 35) | @Override
method getExceptionHandler (line 41) | private ExceptionHandler<? super T> getExceptionHandler()
FILE: src/main/java/com/lmax/disruptor/dsl/ProducerType.java
type ProducerType (line 21) | public enum ProducerType
FILE: src/main/java/com/lmax/disruptor/util/DaemonThreadFactory.java
type DaemonThreadFactory (line 23) | public enum DaemonThreadFactory implements ThreadFactory
method newThread (line 30) | @Override
FILE: src/main/java/com/lmax/disruptor/util/ThreadHints.java
class ThreadHints (line 27) | @Deprecated
method ThreadHints (line 31) | private ThreadHints()
method onSpinWait (line 45) | @Deprecated
FILE: src/main/java/com/lmax/disruptor/util/Util.java
class Util (line 24) | public final class Util
method ceilingNextPowerOfTwo (line 36) | public static int ceilingNextPowerOfTwo(final int x)
method getMinimumSequence (line 47) | public static long getMinimumSequence(final Sequence[] sequences)
method getMinimumSequence (line 61) | public static long getMinimumSequence(final Sequence[] sequences, fina...
method getSequencesFor (line 79) | public static Sequence[] getSequencesFor(final EventProcessor... proce...
method log2 (line 97) | public static int log2(final int value)
method awaitNanos (line 112) | public static long awaitNanos(final Object mutex, final long timeoutNa...
FILE: src/perftest/java/com/lmax/disruptor/AbstractPerfTestDisruptor.java
class AbstractPerfTestDisruptor (line 19) | public abstract class AbstractPerfTestDisruptor
method testImplementations (line 23) | protected void testImplementations()
method printResults (line 46) | public static void printResults(final String className, final PerfTest...
method getRequiredProcessorCount (line 57) | protected abstract int getRequiredProcessorCount();
method runDisruptorPass (line 59) | protected abstract PerfTestContext runDisruptorPass() throws Exception;
FILE: src/perftest/java/com/lmax/disruptor/AbstractPerfTestQueue.java
class AbstractPerfTestQueue (line 19) | public abstract class AbstractPerfTestQueue
method testImplementations (line 23) | protected void testImplementations()
method printResults (line 46) | public static void printResults(final String className, final long[] d...
method getRequiredProcessorCount (line 56) | protected abstract int getRequiredProcessorCount();
method runQueuePass (line 58) | protected abstract long runQueuePass() throws Exception;
FILE: src/perftest/java/com/lmax/disruptor/PerfTestContext.java
class PerfTestContext (line 3) | public class PerfTestContext
method PerfTestContext (line 9) | public PerfTestContext()
method getDisruptorOps (line 13) | public long getDisruptorOps()
method setDisruptorOps (line 18) | public void setDisruptorOps(final long disruptorOps)
method getBatchesProcessedCount (line 23) | public long getBatchesProcessedCount()
method getBatchPercent (line 28) | public double getBatchPercent()
method getAverageBatchSize (line 37) | public double getAverageBatchSize()
method setBatchData (line 46) | public void setBatchData(final long batchesProcessedCount, final long ...
FILE: src/perftest/java/com/lmax/disruptor/immutable/Constants.java
class Constants (line 3) | public class Constants
FILE: src/perftest/java/com/lmax/disruptor/immutable/CustomPerformanceTest.java
class CustomPerformanceTest (line 9) | public class CustomPerformanceTest
method CustomPerformanceTest (line 13) | public CustomPerformanceTest()
method run (line 19) | public void run()
method doRun (line 31) | private void doRun() throws InterruptedException
method main (line 54) | public static void main(final String[] args)
FILE: src/perftest/java/com/lmax/disruptor/immutable/CustomRingBuffer.java
class CustomRingBuffer (line 9) | public class CustomRingBuffer<T> implements DataProvider<EventAccessor<T...
class AccessorEventHandler (line 11) | private static final class AccessorEventHandler<T> implements EventHan...
method AccessorEventHandler (line 15) | private AccessorEventHandler(final EventHandler<T> handler)
method onEvent (line 20) | @Override
method onShutdown (line 26) | @Override
method onStart (line 32) | @Override
method CustomRingBuffer (line 43) | public CustomRingBuffer(final Sequencer sequencer)
method index (line 50) | private int index(final long sequence)
method put (line 55) | public void put(final T e)
method take (line 62) | @SuppressWarnings("unchecked")
method get (line 74) | @Override
method createHandler (line 80) | public BatchEventProcessor<EventAccessor<T>> createHandler(final Event...
FILE: src/perftest/java/com/lmax/disruptor/immutable/EventAccessor.java
type EventAccessor (line 3) | public interface EventAccessor<T>
method take (line 5) | T take(long sequence);
FILE: src/perftest/java/com/lmax/disruptor/immutable/EventHolder.java
class EventHolder (line 5) | public class EventHolder
FILE: src/perftest/java/com/lmax/disruptor/immutable/EventHolderHandler.java
class EventHolderHandler (line 5) | public class EventHolderHandler implements EventHandler<EventHolder>
method EventHolderHandler (line 9) | public EventHolderHandler(final EventHandler<SimpleEvent> delegate)
method onEvent (line 14) | @Override
FILE: src/perftest/java/com/lmax/disruptor/immutable/SimpleEvent.java
class SimpleEvent (line 3) | public class SimpleEvent
method SimpleEvent (line 10) | public SimpleEvent(final long id, final long v1, final long v2, final ...
method getCounter (line 18) | public long getCounter()
method toString (line 23) | @Override
FILE: src/perftest/java/com/lmax/disruptor/immutable/SimpleEventHandler.java
class SimpleEventHandler (line 5) | public class SimpleEventHandler implements EventHandler<SimpleEvent>
method onEvent (line 9) | @Override
FILE: src/perftest/java/com/lmax/disruptor/immutable/SimplePerformanceTest.java
class SimplePerformanceTest (line 11) | public class SimplePerformanceTest
method SimplePerformanceTest (line 16) | public SimplePerformanceTest()
method run (line 22) | public void run()
method doRun (line 34) | private void doRun() throws InterruptedException
method main (line 65) | public static void main(final String[] args)
FILE: src/perftest/java/com/lmax/disruptor/offheap/OneToOneOffHeapThroughputTest.java
class OneToOneOffHeapThroughputTest (line 26) | public class OneToOneOffHeapThroughputTest extends AbstractPerfTestDisru...
method OneToOneOffHeapThroughputTest (line 47) | public OneToOneOffHeapThroughputTest()
method getRequiredProcessorCount (line 52) | @Override
method runDisruptorPass (line 58) | @Override
method waitForEventProcessorSequence (line 86) | private void waitForEventProcessorSequence(final long expectedCount)
method main (line 94) | public static void main(final String[] args) throws Exception
class ByteBufferHandler (line 99) | public static class ByteBufferHandler implements EventHandler<ByteBuffer>
method onEvent (line 106) | @Override
method getTotal (line 121) | public long getTotal()
method getBatchesProcessed (line 126) | public long getBatchesProcessed()
method reset (line 131) | public void reset(final CountDownLatch latch, final long expectedCount)
method onBatchStart (line 139) | @Override
class OffHeapRingBuffer (line 146) | public static class OffHeapRingBuffer implements DataProvider<ByteBuffer>
method initialValue (line 155) | @Override
method OffHeapRingBuffer (line 162) | public OffHeapRingBuffer(final Sequencer sequencer, final int entryS...
method addGatingSequences (line 170) | public void addGatingSequences(final Sequence sequence)
method newBarrier (line 175) | public SequenceBarrier newBarrier()
method get (line 180) | @Override
method put (line 193) | public void put(final byte[] data)
method index (line 206) | private int index(final long next)
FILE: src/perftest/java/com/lmax/disruptor/offheap/OneToOneOnHeapThroughputTest.java
class OneToOneOnHeapThroughputTest (line 23) | public class OneToOneOnHeapThroughputTest extends AbstractPerfTestDisruptor
method OneToOneOnHeapThroughputTest (line 47) | public OneToOneOnHeapThroughputTest()
method getRequiredProcessorCount (line 52) | @Override
method runDisruptorPass (line 58) | @Override
method waitForEventProcessorSequence (line 91) | private void waitForEventProcessorSequence(final long expectedCount)
method main (line 99) | public static void main(final String[] args) throws Exception
class ByteBufferHandler (line 104) | public static class ByteBufferHandler implements EventHandler<ByteBuffer>
method onEvent (line 111) | @Override
method getTotal (line 125) | public long getTotal()
method getBatchesProcessed (line 130) | public long getBatchesProcessed()
method reset (line 135) | public void reset(final CountDownLatch latch, final long expectedCount)
method onBatchStart (line 143) | @Override
class BufferFactory (line 150) | private static final class BufferFactory implements EventFactory<ByteB...
method BufferFactory (line 155) | private BufferFactory(final boolean isDirect, final int size)
method newInstance (line 161) | @Override
method direct (line 174) | public static BufferFactory direct(final int size)
method heap (line 179) | @SuppressWarnings("unused")
class SlicedBufferFactory (line 186) | private static final class SlicedBufferFactory implements EventFactory...
method SlicedBufferFactory (line 193) | private SlicedBufferFactory(final boolean isDirect, final int size, ...
method newInstance (line 204) | @Override
method direct (line 221) | public static SlicedBufferFactory direct(final int size, final int t...
method heap (line 226) | @SuppressWarnings("unused")
FILE: src/perftest/java/com/lmax/disruptor/queue/OneToOneQueueBatchedThroughputTest.java
class OneToOneQueueBatchedThroughputTest (line 53) | public final class OneToOneQueueBatchedThroughputTest extends AbstractPe...
method getRequiredProcessorCount (line 68) | @Override
method runQueuePass (line 74) | @Override
method main (line 97) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/queue/OneToOneQueueThroughputTest.java
class OneToOneQueueThroughputTest (line 53) | public final class OneToOneQueueThroughputTest extends AbstractPerfTestQ...
method getRequiredProcessorCount (line 68) | @Override
method runQueuePass (line 74) | @Override
method main (line 97) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/queue/OneToThreeDiamondQueueThroughputTest.java
class OneToThreeDiamondQueueThroughputTest (line 99) | public final class OneToThreeDiamondQueueThroughputTest extends Abstract...
method getRequiredProcessorCount (line 143) | @Override
method runQueuePass (line 149) | @Override
method main (line 186) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/queue/OneToThreePipelineQueueThroughputTest.java
class OneToThreePipelineQueueThroughputTest (line 61) | public final class OneToThreePipelineQueueThroughputTest extends Abstrac...
method getRequiredProcessorCount (line 104) | @Override
method runQueuePass (line 110) | @Override
method main (line 149) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/queue/OneToThreeQueueThroughputTest.java
class OneToThreeQueueThroughputTest (line 75) | public final class OneToThreeQueueThroughputTest extends AbstractPerfTes...
method getRequiredProcessorCount (line 114) | @Override
method runQueuePass (line 120) | @Override
method main (line 154) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/queue/PingPongQueueLatencyTest.java
class PingPongQueueLatencyTest (line 61) | public final class PingPongQueueLatencyTest
method testImplementation (line 79) | public void testImplementation() throws Exception
method dumpHistogram (line 95) | private static void dumpHistogram(final Histogram histogram, final Pri...
method runQueuePass (line 100) | private void runQueuePass() throws Exception
method main (line 117) | public static void main(final String[] args) throws Exception
class QueuePinger (line 123) | private static class QueuePinger implements Runnable
method QueuePinger (line 135) | QueuePinger(
method run (line 145) | @Override
method reset (line 180) | public void reset(final CyclicBarrier barrier, final CountDownLatch ...
class QueuePonger (line 190) | private static class QueuePonger implements Runnable
method QueuePonger (line 196) | QueuePonger(final BlockingQueue<Long> pingQueue, final BlockingQueue...
method run (line 202) | @Override
method reset (line 226) | public void reset(final CyclicBarrier barrier)
FILE: src/perftest/java/com/lmax/disruptor/queue/ThreeToOneQueueBatchThroughputTest.java
class ThreeToOneQueueBatchThroughputTest (line 72) | public final class ThreeToOneQueueBatchThroughputTest extends AbstractPe...
method getRequiredProcessorCount (line 97) | @Override
method runQueuePass (line 103) | @Override
method main (line 133) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/queue/ThreeToOneQueueThroughputTest.java
class ThreeToOneQueueThroughputTest (line 72) | public final class ThreeToOneQueueThroughputTest extends AbstractPerfTes...
method getRequiredProcessorCount (line 97) | @Override
method runQueuePass (line 103) | @Override
method main (line 133) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/raw/OneToOneRawBatchThroughputTest.java
class OneToOneRawBatchThroughputTest (line 75) | public final class OneToOneRawBatchThroughputTest extends AbstractPerfTe...
method getRequiredProcessorCount (line 92) | @Override
method runDisruptorPass (line 98) | @Override
method waitForEventProcessorSequence (line 125) | private void waitForEventProcessorSequence(final long expectedCount) t...
class MyRunnable (line 133) | private static class MyRunnable implements Runnable
method MyRunnable (line 140) | MyRunnable(final Sequencer sequencer)
method reset (line 145) | public void reset(final CountDownLatch latch, final long expectedCount)
method run (line 151) | @Override
method main (line 176) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/raw/OneToOneRawThroughputTest.java
class OneToOneRawThroughputTest (line 75) | public final class OneToOneRawThroughputTest extends AbstractPerfTestDis...
method getRequiredProcessorCount (line 92) | @Override
method runDisruptorPass (line 98) | @Override
method waitForEventProcessorSequence (line 123) | private void waitForEventProcessorSequence(final long expectedCount) t...
class MyRunnable (line 131) | private static class MyRunnable implements Runnable
method MyRunnable (line 138) | MyRunnable(final Sequencer sequencer)
method reset (line 143) | public void reset(final CountDownLatch latch, final long expectedCount)
method run (line 149) | @Override
method main (line 174) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/sequenced/OneToOneSequencedBatchThroughputTest.java
class OneToOneSequencedBatchThroughputTest (line 66) | public final class OneToOneSequencedBatchThroughputTest extends Abstract...
method getRequiredProcessorCount (line 89) | @Override
method runDisruptorPass (line 95) | @Override
method waitForEventProcessorSequence (line 129) | private void waitForEventProcessorSequence(final long expectedCount) t...
method main (line 137) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/sequenced/OneToOneSequencedLongArrayThroughputTest.java
class OneToOneSequencedLongArrayThroughputTest (line 65) | public final class OneToOneSequencedLongArrayThroughputTest extends Abst...
method getRequiredProcessorCount (line 88) | @Override
method runDisruptorPass (line 94) | @Override
method waitForEventProcessorSequence (line 128) | private void waitForEventProcessorSequence(final long expectedCount) t...
method main (line 136) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/sequenced/OneToOneSequencedPollerThroughputTest.java
class OneToOneSequencedPollerThroughputTest (line 65) | public final class OneToOneSequencedPollerThroughputTest extends Abstrac...
method getRequiredProcessorCount (line 86) | @Override
class PollRunnable (line 92) | private static class PollRunnable implements Runnable, EventPoller.Han...
method PollRunnable (line 101) | PollRunnable(final EventPoller<ValueEvent> poller)
method run (line 106) | @Override
method onEvent (line 125) | @Override
method halt (line 138) | public void halt()
method reset (line 143) | public void reset(final CountDownLatch latch, final long expectedCount)
method getValue (line 152) | public long getValue()
method getBatchesProcessed (line 157) | public long getBatchesProcessed()
method onBatchStart (line 162) | public void onBatchStart(final long batchSize)
method runDisruptorPass (line 168) | @Override
method waitForEventProcessorSequence (line 198) | private void waitForEventProcessorSequence(final long expectedCount) t...
method main (line 206) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/sequenced/OneToOneSequencedThroughputTest.java
class OneToOneSequencedThroughputTest (line 66) | public final class OneToOneSequencedThroughputTest extends AbstractPerfT...
method getRequiredProcessorCount (line 88) | @Override
method runDisruptorPass (line 94) | @Override
method waitForEventProcessorSequence (line 124) | private void waitForEventProcessorSequence(final long expectedCount) t...
method main (line 132) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/sequenced/OneToThreeDiamondSequencedThroughputTest.java
class OneToThreeDiamondSequencedThroughputTest (line 82) | public final class OneToThreeDiamondSequencedThroughputTest extends Abst...
method getRequiredProcessorCount (line 136) | @Override
method runDisruptorPass (line 142) | @Override
method main (line 174) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/sequenced/OneToThreePipelineSequencedThroughputTest.java
class OneToThreePipelineSequencedThroughputTest (line 69) | public final class OneToThreePipelineSequencedThroughputTest extends Abs...
method getRequiredProcessorCount (line 123) | @Override
method runDisruptorPass (line 129) | @Override
method main (line 165) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/sequenced/OneToThreeSequencedThroughputTest.java
class OneToThreeSequencedThroughputTest (line 77) | public final class OneToThreeSequencedThroughputTest extends AbstractPer...
method getRequiredProcessorCount (line 125) | @Override
method runDisruptorPass (line 131) | @Override
method sumBatches (line 163) | private long sumBatches(final ValueMutationEventHandler[] handlers)
method main (line 173) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/sequenced/PingPongSequencedLatencyTest.java
class PingPongSequencedLatencyTest (line 70) | public final class PingPongSequencedLatencyTest
method shouldCompareDisruptorVsQueues (line 103) | public void shouldCompareDisruptorVsQueues() throws Exception
method dumpHistogram (line 119) | private static void dumpHistogram(final Histogram histogram, final Pri...
method runDisruptorPass (line 124) | private void runDisruptorPass() throws InterruptedException, BrokenBar...
method main (line 141) | public static void main(final String[] args) throws Exception
class Pinger (line 147) | private static class Pinger implements EventHandler<ValueEvent>
method Pinger (line 159) | Pinger(final RingBuffer<ValueEvent> buffer, final long maxEvents, fi...
method onEvent (line 166) | @Override
method send (line 188) | private void send()
method onStart (line 198) | @Override
method onShutdown (line 214) | @Override
method reset (line 219) | public void reset(final CyclicBarrier barrier, final CountDownLatch ...
class Ponger (line 229) | private static class Ponger implements EventHandler<ValueEvent>
method Ponger (line 235) | Ponger(final RingBuffer<ValueEvent> buffer)
method onEvent (line 240) | @Override
method onStart (line 248) | @Override
method onShutdown (line 261) | @Override
method reset (line 266) | public void reset(final CyclicBarrier barrier)
FILE: src/perftest/java/com/lmax/disruptor/sequenced/ThreeToOneSequencedBatchThroughputTest.java
class ThreeToOneSequencedBatchThroughputTest (line 84) | public final class ThreeToOneSequencedBatchThroughputTest extends Abstra...
method getRequiredProcessorCount (line 114) | @Override
method runDisruptorPass (line 120) | @Override
method main (line 151) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/sequenced/ThreeToOneSequencedThroughputTest.java
class ThreeToOneSequencedThroughputTest (line 83) | public final class ThreeToOneSequencedThroughputTest extends AbstractPer...
method getRequiredProcessorCount (line 114) | @Override
method runDisruptorPass (line 120) | @Override
method main (line 152) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/sequenced/ThreeToThreeSequencedThroughputTest.java
class ThreeToThreeSequencedThroughputTest (line 67) | public final class ThreeToThreeSequencedThroughputTest extends AbstractP...
method getRequiredProcessorCount (line 111) | @Override
method runDisruptorPass (line 117) | @Override
method main (line 148) | public static void main(final String[] args) throws Exception
FILE: src/perftest/java/com/lmax/disruptor/support/EventCountingQueueProcessor.java
class EventCountingQueueProcessor (line 22) | public final class EventCountingQueueProcessor implements Runnable
method EventCountingQueueProcessor (line 29) | public EventCountingQueueProcessor(
method halt (line 37) | public void halt()
method run (line 42) | @Override
FILE: src/perftest/java/com/lmax/disruptor/support/FizzBuzzEvent.java
class FizzBuzzEvent (line 20) | public final class FizzBuzzEvent
method getValue (line 26) | public long getValue()
method setValue (line 31) | public void setValue(final long value)
method isFizz (line 38) | public boolean isFizz()
method setFizz (line 43) | public void setFizz(final boolean fizz)
method isBuzz (line 48) | public boolean isBuzz()
method setBuzz (line 53) | public void setBuzz(final boolean buzz)
FILE: src/perftest/java/com/lmax/disruptor/support/FizzBuzzEventHandler.java
class FizzBuzzEventHandler (line 23) | public final class FizzBuzzEventHandler implements EventHandler<FizzBuzz...
method FizzBuzzEventHandler (line 30) | public FizzBuzzEventHandler(final FizzBuzzStep fizzBuzzStep)
method reset (line 35) | public void reset(final CountDownLatch latch, final long expectedCount)
method getFizzBuzzCounter (line 42) | public long getFizzBuzzCounter()
method onEvent (line 47) | @Override
FILE: src/perftest/java/com/lmax/disruptor/support/FizzBuzzQueueProcessor.java
class FizzBuzzQueueProcessor (line 21) | public final class FizzBuzzQueueProcessor implements Runnable
method FizzBuzzQueueProcessor (line 35) | public FizzBuzzQueueProcessor(
method getFizzBuzzCounter (line 51) | public long getFizzBuzzCounter()
method reset (line 56) | public void reset(final CountDownLatch latch)
method halt (line 63) | public void halt()
method run (line 68) | @Override
FILE: src/perftest/java/com/lmax/disruptor/support/FizzBuzzStep.java
type FizzBuzzStep (line 18) | public enum FizzBuzzStep
FILE: src/perftest/java/com/lmax/disruptor/support/FunctionEvent.java
class FunctionEvent (line 20) | public final class FunctionEvent
method getOperandOne (line 27) | public long getOperandOne()
method setOperandOne (line 32) | public void setOperandOne(final long operandOne)
method getOperandTwo (line 37) | public long getOperandTwo()
method setOperandTwo (line 42) | public void setOperandTwo(final long operandTwo)
method getStepOneResult (line 47) | public long getStepOneResult()
method setStepOneResult (line 52) | public void setStepOneResult(final long stepOneResult)
method getStepTwoResult (line 57) | public long getStepTwoResult()
method setStepTwoResult (line 62) | public void setStepTwoResult(final long stepTwoResult)
FILE: src/perftest/java/com/lmax/disruptor/support/FunctionEventHandler.java
class FunctionEventHandler (line 23) | public final class FunctionEventHandler implements EventHandler<Function...
method FunctionEventHandler (line 30) | public FunctionEventHandler(final FunctionStep functionStep)
method getStepThreeCounter (line 35) | public long getStepThreeCounter()
method reset (line 40) | public void reset(final CountDownLatch latch, final long expectedCount)
method onEvent (line 47) | @Override
FILE: src/perftest/java/com/lmax/disruptor/support/FunctionQueueProcessor.java
class FunctionQueueProcessor (line 21) | public final class FunctionQueueProcessor implements Runnable
method FunctionQueueProcessor (line 34) | public FunctionQueueProcessor(
method getStepThreeCounter (line 48) | public long getStepThreeCounter()
method reset (line 53) | public void reset(final CountDownLatch latch)
method halt (line 60) | public void halt()
method run (line 65) | @Override
FILE: src/perftest/java/com/lmax/disruptor/support/FunctionStep.java
type FunctionStep (line 18) | public enum FunctionStep
FILE: src/perftest/java/com/lmax/disruptor/support/LongArrayEventHandler.java
class LongArrayEventHandler (line 23) | public final class LongArrayEventHandler implements EventHandler<long[]>
method getValue (line 30) | public long getValue()
method getBatchesProcessed (line 35) | public long getBatchesProcessed()
method reset (line 40) | public void reset(final CountDownLatch latch, final long expectedCount)
method onEvent (line 48) | @Override
method onBatchStart (line 62) | @Override
FILE: src/perftest/java/com/lmax/disruptor/support/LongArrayPublisher.java
class LongArrayPublisher (line 22) | public final class LongArrayPublisher implements Runnable
method LongArrayPublisher (line 29) | public LongArrayPublisher(
method run (line 41) | @Override
FILE: src/perftest/java/com/lmax/disruptor/support/MultiBufferBatchEventProcessor.java
class MultiBufferBatchEventProcessor (line 13) | public class MultiBufferBatchEventProcessor<T>
method MultiBufferBatchEventProcessor (line 23) | public MultiBufferBatchEventProcessor(
method run (line 44) | @Override
method getSequence (line 105) | @Override
method getCount (line 111) | public long getCount()
method getSequences (line 116) | public Sequence[] getSequences()
method halt (line 121) | @Override
method isRunning (line 128) | @Override
FILE: src/perftest/java/com/lmax/disruptor/support/Operation.java
type Operation (line 18) | public enum Operation
method op (line 22) | @Override
method op (line 31) | @Override
method op (line 40) | @Override
method op (line 47) | public abstract long op(long lhs, long rhs);
FILE: src/perftest/java/com/lmax/disruptor/support/PerfTestUtil.java
class PerfTestUtil (line 18) | public final class PerfTestUtil
method accumulatedAddition (line 20) | public static long accumulatedAddition(final long iterations)
method failIf (line 31) | public static void failIf(final long a, final long b)
method failIfNot (line 39) | public static void failIfNot(final long a, final long b)
FILE: src/perftest/java/com/lmax/disruptor/support/ValueAdditionBatchQueueProcessor.java
class ValueAdditionBatchQueueProcessor (line 22) | public final class ValueAdditionBatchQueueProcessor implements Runnable
method ValueAdditionBatchQueueProcessor (line 33) | public ValueAdditionBatchQueueProcessor(final BlockingQueue<Long> bloc...
method getValue (line 39) | public long getValue()
method reset (line 44) | public void reset(final CountDownLatch latch)
method halt (line 51) | public void halt()
method run (line 56) | @Override
method toString (line 97) | @Override
FILE: src/perftest/java/com/lmax/disruptor/support/ValueAdditionEventHandler.java
class ValueAdditionEventHandler (line 23) | public final class ValueAdditionEventHandler implements EventHandler<Val...
method getValue (line 30) | public long getValue()
method getBatchesProcessed (line 35) | public long getBatchesProcessed()
method reset (line 40) | public void reset(final CountDownLatch latch, final long expectedCount)
method onEvent (line 48) | @Override
method onBatchStart (line 59) | @Override
FILE: src/perftest/java/com/lmax/disruptor/support/ValueAdditionQueueBatchProcessor.java
class ValueAdditionQueueBatchProcessor (line 22) | public final class ValueAdditionQueueBatchProcessor implements Runnable
method ValueAdditionQueueBatchProcessor (line 33) | public ValueAdditionQueueBatchProcessor(final BlockingQueue<Long> bloc...
method getValue (line 39) | public long getValue()
method reset (line 44) | public void reset(final CountDownLatch latch)
method halt (line 51) | public void halt()
method run (line 56) | @Override
FILE: src/perftest/java/com/lmax/disruptor/support/ValueAdditionQueueProcessor.java
class ValueAdditionQueueProcessor (line 21) | public final class ValueAdditionQueueProcessor implements Runnable
method ValueAdditionQueueProcessor (line 31) | public ValueAdditionQueueProcessor(final BlockingQueue<Long> blockingQ...
method getValue (line 37) | public long getValue()
method reset (line 42) | public void reset(final CountDownLatch latch)
method halt (line 49) | public void halt()
method run (line 54) | @Override
FILE: src/perftest/java/com/lmax/disruptor/support/ValueBatchPublisher.java
class ValueBatchPublisher (line 22) | public final class ValueBatchPublisher implements Runnable
method ValueBatchPublisher (line 29) | public ValueBatchPublisher(
method run (line 41) | @Override
FILE: src/perftest/java/com/lmax/disruptor/support/ValueEvent.java
class ValueEvent (line 20) | public final class ValueEvent
method getValue (line 24) | public long getValue()
method setValue (line 29) | public void setValue(final long value)
FILE: src/perftest/java/com/lmax/disruptor/support/ValueMutationEventHandler.java
class ValueMutationEventHandler (line 23) | public final class ValueMutationEventHandler implements EventHandler<Val...
method ValueMutationEventHandler (line 31) | public ValueMutationEventHandler(final Operation operation)
method getValue (line 36) | public long getValue()
method getBatchesProcessed (line 41) | public long getBatchesProcessed()
method reset (line 46) | public void reset(final CountDownLatch latch, final long expectedCount)
method onEvent (line 54) | @Override
method onBatchStart (line 65) | @Override
FILE: src/perftest/java/com/lmax/disruptor/support/ValueMutationQueueProcessor.java
class ValueMutationQueueProcessor (line 21) | public final class ValueMutationQueueProcessor implements Runnable
method ValueMutationQueueProcessor (line 32) | public ValueMutationQueueProcessor(
method getValue (line 40) | public long getValue()
method reset (line 45) | public void reset(final CountDownLatch latch)
method halt (line 52) | public void halt()
method run (line 57) | @Override
FILE: src/perftest/java/com/lmax/disruptor/support/ValuePublisher.java
class ValuePublisher (line 22) | public final class ValuePublisher implements Runnable
method ValuePublisher (line 28) | public ValuePublisher(
method run (line 36) | @Override
FILE: src/perftest/java/com/lmax/disruptor/support/ValueQueuePublisher.java
class ValueQueuePublisher (line 21) | public final class ValueQueuePublisher implements Runnable
method ValueQueuePublisher (line 27) | public ValueQueuePublisher(
method run (line 35) | @Override
FILE: src/perftest/java/com/lmax/disruptor/translator/OneToOneTranslatorThroughputTest.java
class OneToOneTranslatorThroughputTest (line 64) | public final class OneToOneTranslatorThroughputTest extends AbstractPerf...
method OneToOneTranslatorThroughputTest (line 75) | @SuppressWarnings("unchecked")
method getRequiredProcessorCount (line 90) | @Override
method runDisruptorPass (line 96) | @Override
class Translator (line 126) | private static class Translator implements EventTranslatorOneArg<Value...
method translateTo (line 130) | @Override
method waitForEventProcessorSequence (line 137) | private void waitForEventProcessorSequence(final long expectedCount) t...
method main (line 145) | public static void main(final String[] args) throws Exception
FILE: src/test/java/com/lmax/disruptor/AggregateEventHandlerTest.java
class AggregateEventHandlerTest (line 24) | @SuppressWarnings("unchecked")
method shouldCallOnEventInSequence (line 31) | @Test
method shouldCallOnStartInSequence (line 45) | @Test
method shouldCallOnShutdownInSequence (line 56) | @Test
method shouldHandleEmptyListOfEventHandlers (line 67) | @Test
method assertLastEvent (line 77) | private static void assertLastEvent(final int[] event, final long sequ...
method assertStartCalls (line 86) | private static void assertStartCalls(final int startCalls, final Dummy...
method assertShutdownCalls (line 94) | private static void assertShutdownCalls(final int startCalls, final Du...
FILE: src/test/java/com/lmax/disruptor/BatchEventProcessorTest.java
class BatchEventProcessorTest (line 37) | public final class BatchEventProcessorTest
method shouldThrowExceptionOnSettingNullExceptionHandler (line 42) | @Test
method shouldCallMethodsInLifecycleOrderForBatch (line 53) | @Test
method shouldCallExceptionHandlerOnUncaughtException (line 77) | @Test
class LatchEventHandler (line 100) | private static class LatchEventHandler implements EventHandler<StubEvent>
method LatchEventHandler (line 104) | LatchEventHandler(final CountDownLatch latch)
method onEvent (line 109) | @Override
class LatchExceptionHandler (line 116) | private static class LatchExceptionHandler implements ExceptionHandler...
method LatchExceptionHandler (line 120) | LatchExceptionHandler(final CountDownLatch latch)
method handleEventException (line 125) | @Override
method handleOnStartException (line 131) | @Override
method handleOnShutdownException (line 137) | @Override
class ExceptionEventHandler (line 144) | private static class ExceptionEventHandler implements EventHandler<Stu...
method onEvent (line 146) | @Override
method reportAccurateBatchSizesAtBatchStartTime (line 153) | @Test
method shouldAlwaysHalt (line 200) | @Test
class LatchLifeCycleHandler (line 245) | private static class LatchLifeCycleHandler implements EventHandler<Obj...
method onEvent (line 250) | @Override
method onStart (line 256) | @Override
method onShutdown (line 262) | @Override
method awaitStart (line 268) | public boolean awaitStart(final long time, final TimeUnit unit) thro...
method awaitStop (line 274) | public boolean awaitStop(final long time, final TimeUnit unit) throw...
method shouldNotPassZeroSizeToBatchStartAware (line 280) | @Test
class DelegatingSequenceBarrier (line 308) | private static class DelegatingSequenceBarrier implements SequenceBarrier
method DelegatingSequenceBarrier (line 313) | DelegatingSequenceBarrier(final SequenceBarrier delegate)
method waitFor (line 318) | @Override
method getCursor (line 326) | @Override
method isAlerted (line 332) | @Override
method alert (line 338) | @Override
method clearAlert (line 344) | @Override
method checkAlert (line 350) | @Override
class BatchAwareEventHandler (line 357) | private static class BatchAwareEventHandler implements EventHandler<St...
method onEvent (line 361) | @Override
method onBatchStart (line 366) | @Override
FILE: src/test/java/com/lmax/disruptor/BatchingTest.java
class BatchingTest (line 18) | public class BatchingTest
method generateData (line 20) | public static Stream<Arguments> generateData()
class ParallelEventHandler (line 25) | private static class ParallelEventHandler implements EventHandler<Long...
method ParallelEventHandler (line 37) | ParallelEventHandler(final long mask, final long ordinal)
method onEvent (line 43) | @Override
method shouldBatch (line 66) | @SuppressWarnings("unchecked")
FILE: src/test/java/com/lmax/disruptor/BusySpinWaitStrategyTest.java
class BusySpinWaitStrategyTest (line 22) | public class BusySpinWaitStrategyTest
method shouldWaitForValue (line 25) | @Test
FILE: src/test/java/com/lmax/disruptor/DisruptorStressTest.java
class DisruptorStressTest (line 19) | public class DisruptorStressTest
method shouldHandleLotsOfThreads (line 23) | @Test
method initialise (line 71) | private Publisher[] initialise(
method initialise (line 83) | @SuppressWarnings("unchecked")
class TestEventHandler (line 96) | private static class TestEventHandler implements EventHandler<TestEvent>
method TestEventHandler (line 101) | TestEventHandler()
method onEvent (line 105) | @Override
class Publisher (line 120) | private static class Publisher implements Runnable
method Publisher (line 129) | Publisher(
method run (line 141) | @Override
class TestEvent (line 171) | private static class TestEvent
FILE: src/test/java/com/lmax/disruptor/EventPollerTest.java
class EventPollerTest (line 11) | public class EventPollerTest
method shouldPollForEvents (line 13) | @Test
method shouldSuccessfullyPollWhenBufferIsFull (line 38) | @Test
FILE: src/test/java/com/lmax/disruptor/EventPublisherTest.java
class EventPublisherTest (line 25) | public class EventPublisherTest implements EventTranslator<LongEvent>
method shouldPublishEvent (line 30) | @Test
method shouldTryPublishEvent (line 42) | @Test
method translateTo (line 60) | @Override
FILE: src/test/java/com/lmax/disruptor/EventTranslatorTest.java
class EventTranslatorTest (line 23) | public final class EventTranslatorTest
method shouldTranslateOtherDataIntoAnEvent (line 27) | @Test
class ExampleEventTranslator (line 38) | public static final class ExampleEventTranslator
method ExampleEventTranslator (line 43) | public ExampleEventTranslator(final String testValue)
method translateTo (line 48) | @Override
FILE: src/test/java/com/lmax/disruptor/FatalExceptionHandlerTest.java
class FatalExceptionHandlerTest (line 24) | public final class FatalExceptionHandlerTest
method shouldHandleFatalException (line 26) | @Test
FILE: src/test/java/com/lmax/disruptor/FixedSequenceGroupTest.java
class FixedSequenceGroupTest (line 24) | public class FixedSequenceGroupTest
method shouldReturnMinimumOf2Sequences (line 27) | @Test
FILE: src/test/java/com/lmax/disruptor/IgnoreExceptionHandlerTest.java
class IgnoreExceptionHandlerTest (line 21) | public final class IgnoreExceptionHandlerTest
method shouldHandleAndIgnoreException (line 23) | @Test
FILE: src/test/java/com/lmax/disruptor/LifecycleAwareTest.java
class LifecycleAwareTest (line 27) | public final class LifecycleAwareTest
method shouldNotifyOfBatchProcessorLifecycle (line 39) | @Test
class LifecycleAwareEventHandler (line 53) | private final class LifecycleAwareEventHandler implements EventHandler...
method onEvent (line 58) | @Override
method onStart (line 63) | @Override
method onShutdown (line 70) | @Override
FILE: src/test/java/com/lmax/disruptor/LiteTimeoutBlockingWaitStrategyTest.java
class LiteTimeoutBlockingWaitStrategyTest (line 11) | public class LiteTimeoutBlockingWaitStrategyTest
method shouldTimeoutWaitFor (line 13) | @Test
FILE: src/test/java/com/lmax/disruptor/MaxBatchSizeEventProcessorTest.java
class MaxBatchSizeEventProcessorTest (line 31) | public final class MaxBatchSizeEventProcessorTest
method setUp (line 42) | @BeforeEach
method shouldLimitTheBatchToConfiguredMaxBatchSize (line 58) | @Test
method shouldAnnounceBatchSizeAndQueueDepthAtTheStartOfBatch (line 66) | @Test
method tearDown (line 75) | @AfterEach
method publishEvents (line 82) | private void publishEvents() throws InterruptedException
class BatchLimitRecordingHandler (line 95) | private static class BatchLimitRecordingHandler implements EventHandle...
method BatchLimitRecordingHandler (line 103) | BatchLimitRecordingHandler(final CountDownLatch countDownLatch)
method onEvent (line 108) | @Override
method onBatchStart (line 121) | @Override
FILE: src/test/java/com/lmax/disruptor/MultiProducerSequencerTest.java
class MultiProducerSequencerTest (line 23) | public class MultiProducerSequencerTest
method shouldOnlyAllowMessagesToBeAvailableIfSpecificallyPublished (line 27) | @Test
FILE: src/test/java/com/lmax/disruptor/PhasedBackoffWaitStrategyTest.java
class PhasedBackoffWaitStrategyTest (line 24) | public class PhasedBackoffWaitStrategyTest
method shouldHandleImmediateSequenceChange (line 26) | @Test
method shouldHandleSequenceChangeWithOneMillisecondDelay (line 33) | @Test
method shouldHandleSequenceChangeWithTwoMillisecondDelay (line 40) | @Test
method shouldHandleSequenceChangeWithTenMillisecondDelay (line 47) | @Test
FILE: src/test/java/com/lmax/disruptor/RewindBatchEventProcessorTest.java
class RewindBatchEventProcessorTest (line 24) | public class RewindBatchEventProcessorTest
method setUp (line 30) | @BeforeEach
method shouldRewindOnFirstEventOfBatchSizeOfOne (line 36) | @Test
method shouldRewindOnFirstEventOfBatch (line 51) | @Test
method shouldRewindOnEventInMiddleOfBatch (line 72) | @Test
method shouldRewindOnLastEventOfBatch (line 94) | @Test
method shouldRunBatchCompleteOnLastEventOfBatch (line 118) | @Test
method shouldRunBatchCompleteOnLastEventOfBatchOfOne (line 139) | @Test
method shouldRewindMultipleTimes (line 154) | @Test
method shouldRewindMultipleTimesOnLastEventInBatch (line 177) | @Test
method shouldRewindMultipleTimesInSameBatch (line 200) | @Test
method shouldRewindMultipleTimesOnBatchOfOne (line 226) | @Test
method shouldFallOverWhenNonRewindableExceptionIsThrown (line 242) | @Test
method shouldProcessUpToMaxBatchSizeForEachGivenBatch (line 259) | @Test
method shouldOnlyRewindBatch (line 278) | @Test
method shouldInvokeRewindPauseStrategyOnRewind (line 301) | @Test
method shouldNotInvokeRewindPauseStrategyWhenNoRewindsOccur (line 328) | @Test
method shouldCopeWithTheNanosecondRewindPauseStrategy (line 352) | @Test
method shouldGiveUpWhenUsingTheGiveUpRewindStrategy (line 378) | @Test
method shouldNotAllowNullBatchRewindStrategy (line 409) | @Test
method rewind (line 420) | private static ForceRewindSequence rewind(final long sequenceNumberToF...
method event (line 425) | private EventRangeExpectation event(final long sequenceStart, final lo...
method create (line 430) | private BatchEventProcessor<LongEvent> create(final TestEventHandler e...
method create (line 435) | private BatchEventProcessor<LongEvent> create(final TestEventHandler e...
class TestEventHandler (line 444) | private static final class TestEventHandler implements RewindableEvent...
method TestEventHandler (line 452) | private TestEventHandler(
method setRewindable (line 465) | public void setRewindable(final BatchEventProcessor<LongEvent> proce...
method onEvent (line 470) | @Override
method fill (line 503) | private static void fill(final RingBuffer<LongEvent> ringBuffer, final...
method containsExactSequence (line 513) | private static Matcher<List<EventResult>> containsExactSequence(final ...
class EventRangeExpectation (line 544) | private static final class EventRangeExpectation
method EventRangeExpectation (line 550) | EventRangeExpectation(final long sequenceStart, final long sequenceE...
method toString (line 557) | @Override
class EventResult (line 569) | private static final class EventResult
method EventResult (line 574) | private EventResult(final long sequence, final boolean batchFinish)
method toString (line 580) | @Override
class CountingBatchRewindStrategy (line 589) | private static final class CountingBatchRewindStrategy implements Batc...
method handleRewindException (line 593) | @Override
class ForceRewindSequence (line 602) | private static final class ForceRewindSequence
method ForceRewindSequence (line 608) | private ForceRewindSequence(final long sequenceNumberToFailOn, final...
FILE: src/test/java/com/lmax/disruptor/RingBufferEventMatcher.java
class RingBufferEventMatcher (line 9) | final class RingBufferEventMatcher extends TypeSafeMatcher<RingBuffer<Ob...
method RingBufferEventMatcher (line 13) | private RingBufferEventMatcher(final Matcher<?>[] expectedValueMatchers)
method ringBufferWithEvents (line 18) | public static RingBufferEventMatcher ringBufferWithEvents(final Matche...
method ringBufferWithEvents (line 23) | public static RingBufferEventMatcher ringBufferWithEvents(final Object...
method matchesSafely (line 34) | @Override
method describeTo (line 46) | @Override
FILE: src/test/java/com/lmax/disruptor/RingBufferTest.java
class RingBufferTest (line 42) | public class RingBufferTest
method shouldClaimAndGet (line 52) | @Test
method shouldClaimAndGetInSeparateThread (line 69) | @Test
method shouldClaimAndGetMultipleMessages (line 80) | @Test
method shouldWrap (line 99) | @Test
method shouldPreventWrapping (line 119) | @Test
method shouldThrowExceptionIfBufferIsFull (line 134) | @Test
method shouldPreventPublishersOvertakingEventProcessorWrapPoint (line 147) | @Test
method shouldPublishEvent (line 188) | @Test
method shouldPublishEventOneArg (line 200) | @Test
method shouldPublishEventTwoArg (line 212) | @Test
method shouldPublishEventThreeArg (line 224) | @Test
method shouldPublishEventVarArg (line 236) | @Test
method shouldPublishEvents (line 248) | @SuppressWarnings("unchecked")
method shouldNotPublishEventsIfBatchIsLargerThanRingBuffer (line 262) | @SuppressWarnings("unchecked")
method shouldPublishEventsWithBatchSizeOfOne (line 284) | @SuppressWarnings("unchecked")
method shouldPublishEventsWithinBatch (line 302) | @SuppressWarnings("unchecked")
method shouldPublishEventsOneArg (line 317) | @Test
method shouldNotPublishEventsOneArgIfBatchIsLargerThanRingBuffer (line 329) | @Test
method shouldPublishEventsOneArgBatchSizeOfOne (line 348) | @Test
method shouldPublishEventsOneArgWithinBatch (line 363) | @Test
method shouldPublishEventsTwoArg (line 375) | @Test
method shouldNotPublishEventsITwoArgIfBatchSizeIsBiggerThanRingBuffer (line 387) | @Test
method shouldPublishEventsTwoArgWithBatchSizeOfOne (line 409) | @Test
method shouldPublishEventsTwoArgWithinBatch (line 424) | @Test
method shouldPublishEventsThreeArg (line 438) | @Test
method shouldNotPublishEventsThreeArgIfBatchIsLargerThanRingBuffer (line 452) | @Test
method shouldPublishEventsThreeArgBatchSizeOfOne (line 475) | @Test
method shouldPublishEventsThreeArgWithinBatch (line 492) | @Test
method shouldPublishEventsVarArg (line 512) | @Test
method shouldNotPublishEventsVarArgIfBatchIsLargerThanRingBuffer (line 529) | @Test
method shouldPublishEventsVarArgBatchSizeOfOne (line 554) | @Test
method shouldPublishEventsVarArgWithinBatch (line 572) | @Test
method shouldNotPublishEventsWhenBatchSizeIs0 (line 593) | @SuppressWarnings("unchecked")
method shouldNotTryPublishEventsWhenBatchSizeIs0 (line 613) | @SuppressWarnings("unchecked")
method shouldNotPublishEventsWhenBatchExtendsPastEndOfArray (line 633) | @SuppressWarnings("unchecked")
method shouldNotTryPublishEventsWhenBatchExtendsPastEndOfArray (line 653) | @SuppressWarnings("unchecked")
method shouldNotPublishEventsWhenBatchSizeIsNegative (line 673) | @SuppressWarnings("unchecked")
method shouldNotTryPublishEventsWhenBatchSizeIsNegative (line 693) | @SuppressWarnings("unchecked")
method shouldNotPublishEventsWhenBatchStartsAtIsNegative (line 713) | @SuppressWarnings("unchecked")
method shouldNotTryPublishEventsWhenBatchStartsAtIsNegative (line 732) | @SuppressWarnings("unchecked")
method shouldNotPublishEventsOneArgWhenBatchSizeIs0 (line 752) | @Test
method shouldNotTryPublishEventsOneArgWhenBatchSizeIs0 (line 771) | @Test
method shouldNotPublishEventsOneArgWhenBatchExtendsPastEndOfArray (line 790) | @Test
method shouldNotPublishEventsOneArgWhenBatchSizeIsNegative (line 809) | @Test
method shouldNotPublishEventsOneArgWhenBatchStartsAtIsNegative (line 828) | @Test
method shouldNotTryPublishEventsOneArgWhenBatchExtendsPastEndOfArray (line 846) | @Test
method shouldNotTryPublishEventsOneArgWhenBatchSizeIsNegative (line 865) | @Test
method shouldNotTryPublishEventsOneArgWhenBatchStartsAtIsNegative (line 884) | @Test
method shouldNotPublishEventsTwoArgWhenBatchSizeIs0 (line 903) | @Test
method shouldNotTryPublishEventsTwoArgWhenBatchSizeIs0 (line 922) | @Test
method shouldNotPublishEventsTwoArgWhenBatchExtendsPastEndOfArray (line 941) | @Test
method shouldNotPublishEventsTwoArgWhenBatchSizeIsNegative (line 960) | @Test
method shouldNotPublishEventsTwoArgWhenBatchStartsAtIsNegative (line 979) | @Test
method shouldNotTryPublishEventsTwoArgWhenBatchExtendsPastEndOfArray (line 997) | @Test
method shouldNotTryPublishEventsTwoArgWhenBatchSizeIsNegative (line 1016) | @Test
method shouldNotTryPublishEventsTwoArgWhenBatchStartsAtIsNegative (line 1035) | @Test
method shouldNotPublishEventsThreeArgWhenBatchSizeIs0 (line 1054) | @Test
method shouldNotTryPublishEventsThreeArgWhenBatchSizeIs0 (line 1075) | @Test
method shouldNotPublishEventsThreeArgWhenBatchExtendsPastEndOfArray (line 1096) | @Test
method shouldNotPublishEventsThreeArgWhenBatchSizeIsNegative (line 1117) | @Test
method shouldNotPublishEventsThreeArgWhenBatchStartsAtIsNegative (line 1138) | @Test
method shouldNotTryPublishEventsThreeArgWhenBatchExtendsPastEndOfArray (line 1159) | @Test
method shouldNotTryPublishEventsThreeArgWhenBatchSizeIsNegative (line 1180) | @Test
method shouldNotTryPublishEventsThreeArgWhenBatchStartsAtIsNegative (line 1201) | @Test
method shouldNotPublishEventsVarArgWhenBatchSizeIs0 (line 1222) | @Test
method shouldNotTryPublishEventsVarArgWhenBatchSizeIs0 (line 1246) | @Test
method shouldNotPublishEventsVarArgWhenBatchExtendsPastEndOfArray (line 1268) | @Test
method shouldNotPublishEventsVarArgWhenBatchSizeIsNegative (line 1292) | @Test
method shouldNotPublishEventsVarArgWhenBatchStartsAtIsNegative (line 1316) | @Test
method shouldNotTryPublishEventsVarArgWhenBatchExtendsPastEndOfArray (line 1340) | @Test
method shouldNotTryPublishEventsVarArgWhenBatchSizeIsNegative (line 1364) | @Test
method shouldNotTryPublishEventsVarArgWhenBatchStartsAtIsNegative (line 1388) | @Test
method shouldAddAndRemoveSequences (line 1412) | @Test
method getMessages (line 1434) | private Future<List<StubEvent>> getMessages(final long initial, final ...
method assertEmptyRingBuffer (line 1450) | private void assertEmptyRingBuffer(final RingBuffer<Object[]> ringBuffer)
class TestEventProcessor (line 1458) | private static final class TestEventProcessor implements EventProcessor
method TestEventProcessor (line 1465) | TestEventProcessor(final SequenceBarrier sequenceBarrier)
method getSequence (line 1470) | @Override
method halt (line 1476) | @Override
method isRunning (line 1482) | @Override
method run (line 1488) | @Override
class ArrayFactory (line 1508) | private static class ArrayFactory implements EventFactory<Object[]>
method ArrayFactory (line 1512) | ArrayFactory(final int size)
method newInstance (line 1517) | @Override
class NoArgEventTranslator (line 1524) | private static class NoArgEventTranslator implements EventTranslator<O...
method translateTo (line 1526) | @Override
class VarArgEventTranslator (line 1533) | private static class VarArgEventTranslator implements EventTranslatorV...
method translateTo (line 1535) | @Override
class ThreeArgEventTranslator (line 1542) | private static class ThreeArgEventTranslator implements EventTranslato...
method translateTo (line 1544) | @Override
class TwoArgEventTranslator (line 1551) | private static class TwoArgEventTranslator implements EventTranslatorT...
method translateTo (line 1553) | @Override
class OneArgEventTranslator (line 1560) | private static class OneArgEventTranslator implements EventTranslatorO...
method translateTo (line 1562) | @Override
FILE: src/test/java/com/lmax/disruptor/RingBufferWithAssertingStubTest.java
class RingBufferWithAssertingStubTest (line 12) | public class RingBufferWithAssertingStubTest
method setUp (line 17) | @BeforeEach
method shouldDelegateNextAndPublish (line 25) | @Test
method shouldDelegateTryNextAndPublish (line 31) | @Test
method shouldDelegateNextNAndPublish (line 37) | @Test
method shouldDelegateTryNextNAndPublish (line 44) | @Test
class AssertingSequencer (line 51) | private static final class AssertingSequencer implements Sequencer
method AssertingSequencer (line 57) | private AssertingSequencer(final int size)
method getBufferSize (line 62) | @Override
method hasAvailableCapacity (line 68) | @Override
method remainingCapacity (line 74) | @Override
method next (line 80) | @Override
method next (line 88) | @Override
method tryNext (line 96) | @Override
method tryNext (line 102) | @Override
method publish (line 108) | @Override
method publish (line 115) | @Override
method getCursor (line 122) | @Override
method claim (line 128) | @Override
method isAvailable (line 134) | @Override
method addGatingSequences (line 140) | @Override
method removeGatingSequence (line 146) | @Override
method newBarrier (line 152) | @Override
method getMinimumSequence (line 158) | @Override
method getHighestPublishedSequence (line 164) | @Override
method newPoller (line 170) | @Override
FILE: src/test/java/com/lmax/disruptor/SequenceBarrierTest.java
class SequenceBarrierTest (line 32) | public final class SequenceBarrierTest
method SequenceBarrierTest (line 36) | public SequenceBarrierTest()
method shouldWaitForWorkCompleteWhereCompleteWorkThresholdIsAhead (line 41) | @Test
method shouldWaitForWorkCompleteWhereAllWorkersAreBlockedOnRingBuffer (line 58) | @Test
method shouldInterruptDuringBusySpin (line 93) | @Test
method shouldWaitForWorkCompleteWhereCompleteWorkThresholdIsBehind (line 117) | @Test
method shouldSetAndClearAlertStatus (line 149) | @Test
method fillRingBuffer (line 163) | private void fillRingBuffer(final long expectedNumberMessages) throws ...
class CountDownLatchSequence (line 174) | private static final class CountDownLatchSequence extends Sequence
method CountDownLatchSequence (line 178) | private CountDownLatchSequence(final long initialValue, final CountD...
method get (line 184) | @Override
FILE: src/test/java/com/lmax/disruptor/SequenceGroupTest.java
class SequenceGroupTest (line 26) | public final class SequenceGroupTest
method shouldReturnMaxSequenceWhenEmptyGroup (line 28) | @Test
method shouldAddOneSequenceToGroup (line 35) | @Test
method shouldNotFailIfTryingToRemoveNotExistingSequence (line 46) | @Test
method shouldReportTheMinimumSequenceForGroupOfTwo (line 55) | @Test
method shouldReportSizeOfGroup (line 68) | @Test
method shouldRemoveSequenceFromGroup (line 79) | @Test
method shouldRemoveSequenceFromGroupWhereItBeenAddedMultipleTimes (line 96) | @Test
method shouldSetGroupSequenceToSameValue (line 114) | @Test
method shouldAddWhileRunning (line 131) | @Test
FILE: src/test/java/com/lmax/disruptor/SequenceReportingCallbackTest.java
class SequenceReportingCallbackTest (line 26) | public class SequenceReportingCallbackTest
method shouldReportProgressByUpdatingSequenceViaCallback (line 31) | @Test
class TestSequenceReportingEventHandler (line 59) | private class TestSequenceReportingEventHandler implements EventHandle...
method setSequenceCallback (line 63) | @Override
method onEvent (line 69) | @Override
FILE: src/test/java/com/lmax/disruptor/SequenceTest.java
class SequenceTest (line 7) | class SequenceTest
method shouldReturnChangedValueAfterAddAndGet (line 9) | @Test
method shouldReturnIncrementedValueAfterIncrementAndGet (line 18) | @Test
method shouldReturnPreviousValueAfterGetAndAdd (line 27) | @Test
FILE: src/test/java/com/lmax/disruptor/SequencerTest.java
class SequencerTest (line 24) | public class SequencerTest
method sequencerGenerator (line 30) | private static Stream<Arguments> sequencerGenerator()
method producerTypeGenerator (line 38) | private static Stream<Arguments> producerTypeGenerator()
method newProducer (line 43) | private static Sequencer newProducer(final ProducerType producerType, ...
method shouldThrowAssertionErrorIfTwoThreadsPublishToSingleProducer (line 56) | @Test
method shouldStartWithInitialValue (line 67) | @ParameterizedTest
method shouldBatchClaim (line 74) | @ParameterizedTest
method shouldIndicateHasAvailableCapacity (line 81) | @ParameterizedTest
method shouldIndicateNoAvailableCapacity (line 97) | @ParameterizedTest
method shouldHoldUpPublisherWhenBufferIsFull (line 108) | @ParameterizedTest
method shouldThrowInsufficientCapacityExceptionWhenSequencerIsFull (line 149) | @ParameterizedTest
method shouldCalculateRemainingCapacity (line 164) | @ParameterizedTest
method shouldNotBeAvailableUntilPublished (line 178) | @ParameterizedTest
method shouldNotifyWaitStrategyOnPublish (line 199) | @ParameterizedTest
method shouldNotifyWaitStrategyOnPublishBatch (line 211) | @ParameterizedTest
method shouldWaitOnPublication (line 225) | @ParameterizedTest
method shouldTryNext (line 250) | @ParameterizedTest
method shouldClaimSpecificSequence (line 264) | @ParameterizedTest
method shouldNotAllowBulkNextLessThanZero (line 275) | @ParameterizedTest
method shouldNotAllowBulkNextOfZero (line 282) | @ParameterizedTest
method shouldNotAllowBulkTryNextLessThanZero (line 289) | @ParameterizedTest
method shouldNotAllowBulkTryNextOfZero (line 296) | @ParameterizedTest
method sequencesBecomeAvailableAfterAPublish (line 303) | @ParameterizedTest
method sequencesBecomeUnavailableAfterWrapping (line 314) | @ParameterizedTest
FILE: src/test/java/com/lmax/disruptor/ShutdownOnFatalExceptionTest.java
class ShutdownOnFatalExceptionTest (line 14) | public class ShutdownOnFatalExceptionTest
method setUp (line 23) | @SuppressWarnings("unchecked")
method shouldShutdownGracefulEvenWithFatalExceptionHandler (line 34) | @Test
method tearDown (line 49) | @AfterEach
class ByteArrayTranslator (line 55) | private static class ByteArrayTranslator implements EventTranslator<by...
method ByteArrayTranslator (line 60) | ByteArrayTranslator(final byte[] bytes)
method translateTo (line 65) | @Override
class FailingEventHandler (line 72) | private static class FailingEventHandler implements EventHandler<byte[]>
method onEvent (line 76) | @Override
class ByteArrayFactory (line 88) | private static class ByteArrayFactory implements EventFactory<byte[]>
method ByteArrayFactory (line 92) | ByteArrayFactory(final int eventSize)
method newInstance (line 97) | @Override
FILE: src/test/java/com/lmax/disruptor/SingleProducerSequencerTest.java
class SingleProducerSequencerTest (line 8) | public class SingleProducerSequencerTest
method shouldNotUpdateCursorDuringHasAvailableCapacity (line 10) | @Test
FILE: src/test/java/com/lmax/disruptor/SleepingWaitStrategyTest.java
class SleepingWaitStrategyTest (line 23) | public class SleepingWaitStrategyTest
method shouldWaitForValue (line 25) | @Test
FILE: src/test/java/com/lmax/disruptor/TimeoutBlockingWaitStrategyTest.java
class TimeoutBlockingWaitStrategyTest (line 12) | public class TimeoutBlockingWaitStrategyTest
method shouldTimeoutWaitFor (line 14) | @Test
FILE: src/test/java/com/lmax/disruptor/YieldingWaitStrategyTest.java
class YieldingWaitStrategyTest (line 22) | public class YieldingWaitStrategyTest
method shouldWaitForValue (line 25) | @Test
FILE: src/test/java/com/lmax/disruptor/alternatives/MultiProducerSequencerUnsafe.java
class MultiProducerSequencerUnsafe (line 38) | public final class MultiProducerSequencerUnsafe extends AbstractSequencer
method MultiProducerSequencerUnsafe (line 58) | public MultiProducerSequencerUnsafe(final int bufferSize, final WaitSt...
method hasAvailableCapacity (line 70) | @Override
method hasAvailableCapacity (line 76) | private boolean hasAvailableCapacity(final Sequence[] gatingSequences,...
method claim (line 98) | @Override
method next (line 107) | @Override
method next (line 116) | @Override
method tryNext (line 160) | @Override
method tryNext (line 169) | @Override
method remainingCapacity (line 198) | @Override
method initialiseAvailableBuffer (line 206) | private void initialiseAvailableBuffer()
method publish (line 219) | @Override
method publish (line 229) | @Override
method setAvailable (line 258) | private void setAvailable(final long sequence)
method setAvailableBufferValue (line 263) | private void setAvailableBufferValue(final int index, final int flag)
method isAvailable (line 272) | @Override
method getHighestPublishedSequence (line 281) | @Override
method calculateAvailabilityFlag (line 295) | private int calculateAvailabilityFlag(final long sequence)
method calculateIndex (line 300) | private int calculateIndex(final long sequence)
FILE: src/test/java/com/lmax/disruptor/alternatives/MultiProducerSequencerVarHandle.java
class MultiProducerSequencerVarHandle (line 38) | public final class MultiProducerSequencerVarHandle extends AbstractSeque...
method MultiProducerSequencerVarHandle (line 56) | public MultiProducerSequencerVarHandle(final int bufferSize, final Wai...
method hasAvailableCapacity (line 68) | @Override
method hasAvailableCapacity (line 74) | private boolean hasAvailableCapacity(final Sequence[] gatingSequences,...
method claim (line 96) | @Override
method next (line 105) | @Override
method next (line 114) | @Override
method tryNext (line 158) | @Override
method tryNext (line 167) | @Override
method remainingCapacity (line 196) | @Override
method initialiseAvailableBuffer (line 204) | private void initialiseAvailableBuffer()
method publish (line 217) | @Override
method publish (line 227) | @Override
method setAvailable (line 256) | private void setAvailable(final long sequence)
method setAvailableBufferValue (line 261) | private void setAvailableBufferValue(final int index, final int flag)
method isAvailable (line 269) | @Override
method getHighestPublishedSequence (line 277) | @Override
method calculateAvailabilityFlag (line 291) | private int calculateAvailabilityFlag(final long sequence)
method calculateIndex (line 296) | private int calculateIndex(final long sequence)
FILE: src/test/java/com/lmax/disruptor/alternatives/RingBufferArray.java
class RingBufferPad (line 40) | abstract class RingBufferPad
class RingBufferFieldsArray (line 52) | abstract class RingBufferFieldsArray<E> extends RingBufferPad
method RingBufferFieldsArray (line 61) | @SuppressWarnings("unchecked")
method fill (line 83) | private void fill(final EventFactory<E> eventFactory)
method elementAt (line 91) | protected final E elementAt(final long sequence)
class RingBufferArray (line 103) | public final class RingBufferArray<E> extends RingBufferFieldsArray<E> i...
method RingBufferArray (line 125) | public RingBufferArray(
method createMultiProducer (line 143) | public static <E> RingBufferArray<E> createMultiProducer(
method createMultiProducer (line 163) | public static <E> RingBufferArray<E> createMultiProducer(final EventFa...
method createSingleProducer (line 179) | public static <E> RingBufferArray<E> createSingleProducer(
method createSingleProducer (line 199) | public static <E> RingBufferArray<E> createSingleProducer(final EventF...
method create (line 215) | public static <E> RingBufferArray<E> create(
method get (line 247) | @Override
method next (line 270) | @Override
method next (line 284) | @Override
method tryNext (line 310) | @Override
method tryNext (line 324) | @Override
method resetTo (line 338) | @Deprecated
method claimAndGetPreallocated (line 352) | public E claimAndGetPreallocated(final long sequence)
method isAvailable (line 381) | public boolean isAvailable(final long sequence)
method addGatingSequences (line 392) | public void addGatingSequences(final Sequence... gatingSequences)
method getMinimumGatingSequence (line 404) | public long getMinimumGatingSequence()
method removeGatingSequence (line 415) | public boolean removeGatingSequence(final Sequence sequence)
method newBarrier (line 428) | public SequenceBarrier newBarrier(final Sequence... sequencesToTrack)
method newPoller (line 439) | public EventPoller<E> newPoller(final Sequence... gatingSequences)
method getCursor (line 451) | @Override
method getBufferSize (line 462) | @Override
method hasAvailableCapacity (line 478) | @Override
method publishEvent (line 488) | @Override
method tryPublishEvent (line 498) | @Override
method publishEvent (line 517) | @Override
method tryPublishEvent (line 528) | @Override
method publishEvent (line 547) | @Override
method tryPublishEvent (line 558) | @Override
method publishEvent (line 577) | @Override
method tryPublishEvent (line 588) | @Override
method publishEvent (line 606) | @Override
method tryPublishEvent (line 616) | @Override
method publishEvents (line 635) | @Override
method publishEvents (line 644) | @Override
method tryPublishEvents (line 655) | @Override
method tryPublishEvents (line 664) | @Override
method publishEvents (line 684) | @Override
method publishEvents (line 694) | @Override
method tryPublishEvents (line 706) | @Override
method tryPublishEvents (line 716) | @Override
method publishEvents (line 737) | @Override
method publishEvents (line 747) | @Override
method tryPublishEvents (line 760) | @Override
method tryPublishEvents (line 770) | @Override
method publishEvents (line 791) | @Override
method publishEvents (line 801) | @Override
method tryPublishEvents (line 814) | @Override
method tryPublishEvents (line 825) | @Override
method publishEvents (line 845) | @Override
method publishEvents (line 854) | @Override
method tryPublishEvents (line 865) | @Override
method tryPublishEvents (line 874) | @Override
method publish (line 897) | @Override
method publish (line 911) | @Override
method remainingCapacity (line 922) | @Override
method checkBounds (line 928) | private void checkBounds(final EventTranslator<E>[] translators, final...
method checkBatchSizing (line 934) | private void checkBatchSizing(final int batchStartsAt, final int batch...
method checkBounds (line 946) | private <A> void checkBounds(final A[] arg0, final int batchStartsAt, ...
method checkBounds (line 952) | private <A, B> void checkBounds(final A[] arg0, final B[] arg1, final ...
method checkBounds (line 959) | private <A, B, C> void checkBounds(
method checkBounds (line 968) | private void checkBounds(final int batchStartsAt, final int batchSize,...
method batchOverRuns (line 974) | private <A> void batchOverRuns(final A[] arg0, final int batchStartsAt...
method translateAndPublish (line 985) | private void translateAndPublish(final EventTranslator<E> translator, ...
method translateAndPublish (line 997) | private <A> void translateAndPublish(final EventTranslatorOneArg<E, A>...
method translateAndPublish (line 1009) | private <A, B> void translateAndPublish(final EventTranslatorTwoArg<E,...
method translateAndPublish (line 1021) | private <A, B, C> void translateAndPublish(
method translateAndPublish (line 1035) | private void translateAndPublish(final EventTranslatorVararg<E> transl...
method translateAndPublishBatch (line 1047) | private void translateAndPublishBatch(
method translateAndPublishBatch (line 1068) | private <A> void translateAndPublishBatch(
method translateAndPublishBatch (line 1088) | private <A, B> void translateAndPublishBatch(
method translateAndPublishBatch (line 1109) | private <A, B, C> void translateAndPublishBatch(
method translateAndPublishBatch (line 1130) | private void translateAndPublishBatch(
method toString (line 1150) | @Override
FILE: src/test/java/com/lmax/disruptor/alternatives/RingBufferUnsafe.java
class RingBufferPadUnsafe (line 26) | abstract class RingBufferPadUnsafe
class RingBufferFieldsUnsafe (line 38) | abstract class RingBufferFieldsUnsafe<E> extends RingBufferPadUnsafe
method RingBufferFieldsUnsafe (line 77) | RingBufferFieldsUnsafe(
method fill (line 98) | private void fill(final EventFactory<E> eventFactory)
method elementAt (line 106) | @SuppressWarnings("unchecked")
class RingBufferUnsafe (line 119) | public final class RingBufferUnsafe<E> extends RingBufferFieldsUnsafe<E>...
method RingBufferUnsafe (line 138) | public RingBufferUnsafe(
method createMultiProducer (line 156) | public static <E> RingBufferUnsafe<E> createMultiProducer(
method createMultiProducer (line 176) | public static <E> RingBufferUnsafe<E> createMultiProducer(final EventF...
method createSingleProducer (line 192) | public static <E> RingBufferUnsafe<E> createSingleProducer(
method createSingleProducer (line 212) | public static <E> RingBufferUnsafe<E> createSingleProducer(final Event...
method create (line 228) | public static <E> RingBufferUnsafe<E> create(
method get (line 260) | @Override
method next (line 283) | @Override
method next (line 297) | @Override
method tryNext (line 323) | @Override
method tryNext (line 337) | @Override
method resetTo (line 351) | @Deprecated
method claimAndGetPreallocated (line 365) | public E claimAndGetPreallocated(final long sequence)
method isAvailable (line 394) | public boolean isAvailable(final long sequence)
method addGatingSequences (line 405) | public void addGatingSequences(final Sequence... gatingSequences)
method getMinimumGatingSequence (line 417) | public long getMinimumGatingSequence()
method removeGatingSequence (line 428) | public boolean removeGatingSequence(final Sequence sequence)
method newBarrier (line 441) | public SequenceBarrier newBarrier(final Sequence... sequencesToTrack)
method newPoller (line 452) | public EventPoller<E> newPoller(final Sequence... gatingSequences)
method getCursor (line 464) | @Override
method getBufferSize (line 475) | @Override
method hasAvailableCapacity (line 491) | @Override
method publishEvent (line 501) | @Override
method tryPublishEvent (line 511) | @Override
method publishEvent (line 530) | @Override
method tryPublishEvent (line 541) | @Override
method publishEvent (line 560) | @Override
method tryPublishEvent (line 571) | @Override
method publishEvent (line 590) | @Override
method tryPublishEvent (line 601) | @Override
method publishEvent (line 619) | @Override
method tryPublishEvent (line 629) | @Override
method publishEvents (line 648) | @Override
method publishEvents (line 657) | @Override
method tryPublishEvents (line 668) | @Override
method tryPublishEvents (line 677) | @Override
method publishEvents (line 697) | @Override
method publishEvents (line 707) | @Override
method tryPublishEvents (line 719) | @Override
method tryPublishEvents (line 729) | @Override
method publishEvents (line 750) | @Override
method publishEvents (line 760) | @Override
method tryPublishEvents (line 773) | @Override
method tryPublishEvents (line 783) | @Override
method publishEvents (line 804) | @Override
method publishEvents (line 814) | @Override
method tryPublishEvents (line 827) | @Override
method tryPublishEvents (line 838) | @Override
method publishEvents (line 858) | @Override
method publishEvents (line 867) | @Override
method tryPublishEvents (line 878) | @Override
method tryPublishEvents (line 887) | @Override
method publish (line 910) | @Override
method publish (line 924) | @Override
method remainingCapacity (line 935) | @Override
method checkBounds (line 941) | private void checkBounds(final EventTranslator<E>[] translators, final...
method checkBatchSizing (line 947) | private void checkBatchSizing(final int batchStartsAt, final int batch...
method checkBounds (line 959) | private <A> void checkBounds(final A[] arg0, final int batchStartsAt, ...
method checkBounds (line 965) | private <A, B> void checkBounds(final A[] arg0, final B[] arg1, final ...
method checkBounds (line 972) | private <A, B, C> void checkBounds(
method checkBounds (line 981) | private void checkBounds(final int batchStartsAt, final int batchSize,...
method batchOverRuns (line 987) | private <A> void batchOverRuns(final A[] arg0, final int batchStartsAt...
method translateAndPublish (line 998) | private void translateAndPublish(final EventTranslator<E> translator, ...
method translateAndPublish (line 1010) | private <A> void translateAndPublish(final EventTranslatorOneArg<E, A>...
method translateAndPublish (line 1022) | private <A, B> void translateAndPublish(final EventTranslatorTwoArg<E,...
method translateAndPublish (line 1034) | private <A, B, C> void translateAndPublish(
method translateAndPublish (line 1048) | private void translateAndPublish(final EventTranslatorVararg<E> transl...
method translateAndPublishBatch (line 1060) | private void translateAndPublishBatch(
method translateAndPublishBatch (line 1081) | private <A> void translateAndPublishBatch(
method translateAndPublishBatch (line 1101) | private <A, B> void translateAndPublishBatch(
method translateAndPublishBatch (line 1122) | private <A, B, C> void translateAndPublishBatch(
method translateAndPublishBatch (line 1143) | private void translateAndPublishBatch(
method toString (line 1163) | @Override
FILE: src/test/java/com/lmax/disruptor/alternatives/SequenceDoublePadded.java
class LhsPaddingDouble (line 23) | class LhsPaddingDouble
class ValueDoublePadded (line 30) | class ValueDoublePadded extends LhsPaddingDouble
class RhsPaddingDouble (line 35) | class RhsPaddingDouble extends ValueDoublePadded
class SequenceDoublePadded (line 50) | public class SequenceDoublePadded extends RhsPaddingDouble
method SequenceDoublePadded (line 72) | public SequenceDoublePadded()
method SequenceDoublePadded (line 82) | public SequenceDoublePadded(final long initialValue)
method get (line 92) | public long get()
method set (line 104) | public void set(final long value)
method setVolatile (line 117) | public void setVolatile(final long value)
method compareAndSet (line 129) | public boolean compareAndSet(final long expectedValue, final long newV...
method incrementAndGet (line 139) | public long incrementAndGet()
method addAndGet (line 150) | public long addAndGet(final long increment)
method toString (line 165) | @Override
FILE: src/test/java/com/lmax/disruptor/alternatives/SequenceUnsafe.java
class LhsPaddingUnsafe (line 6) | class LhsPaddingUnsafe
class ValueUnsafe (line 18) | class ValueUnsafe extends LhsPaddingUnsafe
class RhsPaddingUnsafe (line 23) | class RhsPaddingUnsafe extends ValueUnsafe
class SequenceUnsafe (line 43) | public class SequenceUnsafe extends RhsPaddingUnsafe
method SequenceUnsafe (line 65) | public SequenceUnsafe()
method SequenceUnsafe (line 75) | public SequenceUnsafe(final long initialValue)
method get (line 85) | public long get()
method set (line 97) | public void set(final long value)
method setVolatile (line 110) | public void setVolatile(final long value)
method compareAndSet (line 122) | public boolean compareAndSet(final long expectedValue, final long newV...
method incrementAndGet (line 132) | public long incrementAndGet()
method addAndGet (line 143) | public long addAndGet(final long increment)
method toString (line 158) | @Override
FILE: src/test/java/com/lmax/disruptor/alternatives/SequenceVarHandle.java
class LhsPaddingVarHandle (line 7) | class LhsPaddingVarHandle
class ValueVarHandle (line 19) | class ValueVarHandle extends LhsPaddingVarHandle
class RhsPaddingVarHandle (line 24) | class RhsPaddingVarHandle extends ValueVarHandle
class SequenceVarHandle (line 44) | public class SequenceVarHandle extends RhsPaddingVarHandle
method SequenceVarHandle (line 65) | public SequenceVarHandle()
method SequenceVarHandle (line 75) | public SequenceVarHandle(final long initialValue)
method get (line 85) | public long get()
method set (line 97) | public void set(final long value)
method setVolatile (line 110) | public void setVolatile(final long value)
method compareAndSet (line 122) | public boolean compareAndSet(final long expectedValue, final long newV...
method incrementAndGet (line 132) | public long incrementAndGet()
method addAndGet (line 143) | public long addAndGet(final long increment)
method toString (line 148) | @Override
FILE: src/test/java/com/lmax/disruptor/alternatives/SequenceVarHandleArray.java
class SequenceVarHandleArray (line 15) | public class SequenceVarHandleArray
method SequenceVarHandleArray (line 27) | public SequenceVarHandleArray()
method SequenceVarHandleArray (line 37) | public SequenceVarHandleArray(final long initialValue)
method get (line 47) | public long get()
method set (line 59) | public void set(final long value)
method setVolatile (line 72) | public void setVolatile(final long value)
method compareAndSet (line 84) | public boolean compareAndSet(final long expectedValue, final long newV...
method incrementAndGet (line 94) | public long incrementAndGet()
method addAndGet (line 105) | public long addAndGet(final long increment)
method toString (line 110) | @Override
FILE: src/test/java/com/lmax/disruptor/alternatives/SequenceVarHandleBarrier.java
class LhsPaddingVarHandleBarrier (line 7) | class LhsPaddingVarHandleBarrier
class ValueVarHandleBarrier (line 19) | class ValueVarHandleBarrier extends LhsPaddingVarHandleBarrier
class RhsPaddingVarHandleBarrier (line 24) | class RhsPaddingVarHandleBarrier extends ValueVarHandleBarrier
class SequenceVarHandleBarrier (line 44) | public class SequenceVarHandleBarrier extends RhsPaddingVarHandleBarrier
method SequenceVarHandleBarrier (line 65) | public SequenceVarHandleBarrier()
method SequenceVarHandleBarrier (line 75) | public SequenceVarHandleBarrier(final long initialValue)
method get (line 86) | public long get()
method set (line 100) | public void set(final long value)
method setVolatile (line 114) | public void setVolatile(final long value)
method compareAndSet (line 128) | public boolean compareAndSet(final long expectedValue, final long newV...
method incrementAndGet (line 138) | public long incrementAndGet()
method addAndGet (line 149) | public long addAndGet(final long increment)
method toString (line 154) | @Override
FILE: src/test/java/com/lmax/disruptor/dsl/ConsumerRepositoryTest.java
class ConsumerRepositoryTest (line 33) | public class ConsumerRepositoryTest
method setUp (line 43) | @BeforeEach
method shouldGetBarrierByHandler (line 60) | @Test
method shouldReturnNullForBarrierWhenHandlerIsNotRegistered (line 68) | @Test
method shouldRetrieveEventProcessorForHandler (line 74) | @Test
method shouldThrowExceptionWhenHandlerIsNotRegistered (line 82) | @Test
FILE: src/test/java/com/lmax/disruptor/dsl/DisruptorTest.java
class DisruptorTest (line 65) | public class DisruptorTest
method setUp (line 75) | @BeforeEach
method tearDown (line 81) | @AfterEach
method shouldHaveStartedAfterStartCalled (line 93) | @Test
method shouldProcessMessagesPublishedBeforeStartIsCalled (line 103) | @Test
method shouldBatchOfEvents (line 125) | @Test
method shouldHandleEventsWithRewindableEventHandlers (line 143) | @Test
method shouldAddEventProcessorsAfterPublishing (line 162) | @Test
method shouldSetSequenceForHandlerIfAddedAfterPublish (line 191) | @Test
method shouldGetSequenceBarrierForHandler (line 213) | @Test
method shouldGetSequenceBarrierForHandlerIfAddedAfterPublish (line 232) | @Test
method shouldCreateEventProcessorGroupForFirstEventProcessors (line 251) | @Test
method shouldMakeEntriesAvailableToFirstHandlersImmediately (line 266) | @Test
method shouldWaitUntilAllFirstEventProcessorsProcessEventBeforeMakingItAvailableToDependentEventProcessors (line 277) | @Test
method shouldSupportAddingCustomEventProcessorWithFactory (line 291) | @Test
method shouldAllowSpecifyingSpecificEventProcessorsToWaitFor (line 307) | @Test
method shouldWaitOnAllProducersJoinedByAnd (line 325) | @Test
method shouldThrowExceptionIfHandlerIsNotAlreadyConsuming (line 344) | @Test
method shouldTrackEventHandlersByIdentityNotEquality (line 351) | @Test
method shouldSupportSpecifyingAExceptionHandlerForEventProcessors (line 366) | @SuppressWarnings("deprecation")
method shouldOnlyApplyExceptionsHandlersSpecifiedViaHandleExceptionsWithOnNewEventProcessors (line 385) | @SuppressWarnings("deprecation")
method shouldSupportSpecifyingADefaultExceptionHandlerForEventProcessors (line 405) | @Test
method shouldApplyDefaultExceptionHandlerToExistingEventProcessors (line 423) | @Test
method shouldBlockProducerUntilAllEventProcessorsHaveAdvanced (line 441) | @Test
method shouldBeAbleToOverrideTheExceptionHandlerForAEventProcessor (line 472) | @Test
method shouldThrowExceptionWhenAddingEventProcessorsAfterTheProducerBarrierHasBeenCreated (line 490) | @Test
method shouldThrowExceptionIfStartIsCalledTwice (line 502) | @Test
method shouldSupportCustomProcessorsAsDependencies (line 514) | @Test
method shouldSupportHandlersAsDependenciesToCustomProcessors (line 535) | @Test
method shouldSupportCustomProcessorsAndHandlersAsDependencies (line 557) | @Test
method shouldSupportMultipleCustomProcessorsAsDependencies (line 580) | @Test
method shouldThrowTimeoutExceptionIfShutdownDoesNotCompleteNormally (line 602) | @Test
method shouldTrackRemainingCapacity (line 617) | @Test
method shouldAllowEventHandlerWithSuperType (line 640) | @Test
method shouldAllowChainingEventHandlersWithSuperType (line 651) | @Test
method shouldMakeEntriesAvailableToFirstCustomProcessorsImmediately (line 663) | @Test
method shouldHonourDependenciesForCustomProcessors (line 682) | @Test
method ensureTwoEventsProcessedAccordingToDependencies (line 702) | private void ensureTwoEventsProcessedAccordingToDependencies(
method assertProducerReaches (line 720) | private void assertProducerReaches(
method createDisruptor (line 745) | private void createDisruptor()
method publishEvent (line 755) | private void publishEvent() throws InterruptedException, BrokenBarrier...
method waitFor (line 772) | private Throwable waitFor(final AtomicReference<Throwable> reference)
method createDelayedEventHandler (line 782) | private DelayedEventHandler createDelayedEventHandler()
method assertThatCountDownLatchEquals (line 789) | @SuppressWarnings("SameParameterValue")
method assertThatCountDownLatchIsZero (line 797) | private void assertThatCountDownLatchIsZero(final CountDownLatch count...
FILE: src/test/java/com/lmax/disruptor/dsl/stubs/DelayedEventHandler.java
class DelayedEventHandler (line 25) | public class DelayedEventHandler implements EventHandler<TestEvent>
method DelayedEventHandler (line 31) | public DelayedEventHandler(final CyclicBarrier barrier)
method DelayedEventHandler (line 36) | public DelayedEventHandler()
method onEvent (line 41) | @Override
method processEvent (line 47) | public void processEvent()
method stopWaiting (line 52) | public void stopWaiting()
method waitForAndSetFlag (line 57) | private void waitForAndSetFlag(final boolean newValue)
method onStart (line 66) | @Override
method onShutdown (line 83) | @Override
method awaitStart (line 88) | public void awaitStart() throws InterruptedException, BrokenBarrierExc...
FILE: src/test/java/com/lmax/disruptor/dsl/stubs/EventHandlerStub.java
class EventHandlerStub (line 22) | public class EventHandlerStub<T> implements EventHandler<T>
method EventHandlerStub (line 26) | public EventHandlerStub(final CountDownLatch countDownLatch)
method onEvent (line 31) | @Override
FILE: src/test/java/com/lmax/disruptor/dsl/stubs/EvilEqualsEventHandler.java
class EvilEqualsEventHandler (line 21) | public class EvilEqualsEventHandler implements EventHandler<TestEvent>
method onEvent (line 23) | @Override
method equals (line 28) | @SuppressWarnings({"EqualsWhichDoesntCheckParameterClass"})
method hashCode (line 34) | public int hashCode()
FILE: src/test/java/com/lmax/disruptor/dsl/stubs/ExceptionThrowingEventHandler.java
class ExceptionThrowingEventHandler (line 21) | public class ExceptionThrowingEventHandler implements EventHandler<TestE...
method ExceptionThrowingEventHandler (line 25) | public ExceptionThrowingEventHandler(final RuntimeException testExcept...
method onEvent (line 30) | @Override
FILE: src/test/java/com/lmax/disruptor/dsl/stubs/SleepingEventHandler.java
class SleepingEventHandler (line 21) | public class SleepingEventHandler implements EventHandler<TestEvent>
method onEvent (line 23) | @Override
FILE: src/test/java/com/lmax/disruptor/dsl/stubs/StubExceptionHandler.java
class StubExceptionHandler (line 22) | public class StubExceptionHandler implements ExceptionHandler<Object>
method StubExceptionHandler (line 26) | public StubExceptionHandler(final AtomicReference<Throwable> exception...
method handleEventException (line 31) | @Override
method handleOnStartException (line 37) | @Override
method handleOnShutdownException (line 43) | @Override
FILE: src/test/java/com/lmax/disruptor/dsl/stubs/StubPublisher.java
class StubPublisher (line 21) | public class StubPublisher implements Runnable
method StubPublisher (line 28) | public StubPublisher(final RingBuffer<TestEvent> ringBuffer)
method run (line 33) | public void run()
method getPublicationCount (line 44) | public int getPublicationCount()
method halt (line 49) | public void halt()
FILE: src/test/java/com/lmax/disruptor/dsl/stubs/StubThreadFactory.java
class StubThreadFactory (line 34) | public final class StubThreadFactory implements ThreadFactory, AfterEach...
method newThread (line 45) | @Override
method joinAllThreads (line 70) | public void joinAllThreads()
method ignoreExecutions (line 93) | public void ignoreExecutions()
method getExecutionCount (line 98) | public int getExecutionCount()
method afterEach (line 103) | @Override
class IgnoredException (line 129) | private static final class IgnoredException
method IgnoredException (line 134) | IgnoredException(final String exceptionMessage, final String reason)
class NoOpRunnable (line 141) | private static final class NoOpRunnable implements Runnable
method run (line 143) | @Override
FILE: src/test/java/com/lmax/disruptor/support/DummyEventHandler.java
class DummyEventHandler (line 5) | public class DummyEventHandler<T> implements EventHandler<T>
method onStart (line 12) | @Override
method onShutdown (line 18) | @Override
method onEvent (line 24) | @Override
FILE: src/test/java/com/lmax/disruptor/support/DummyEventProcessor.java
class DummyEventProcessor (line 9) | public class DummyEventProcessor implements EventProcessor
method DummyEventProcessor (line 14) | public DummyEventProcessor(final Sequence sequence)
method DummyEventProcessor (line 19) | public DummyEventProcessor()
method setSequence (line 24) | public void setSequence(final long sequence)
method getSequence (line 29) | @Override
method halt (line 35) | @Override
method isRunning (line 41) | @Override
method run (line 47) | @Override
FILE: src/test/java/com/lmax/disruptor/support/DummySequenceBarrier.java
class DummySequenceBarrier (line 22) | public class DummySequenceBarrier implements SequenceBarrier
method waitFor (line 24) | @Override
method getCursor (line 30) | @Override
method isAlerted (line 36) | @Override
method alert (line 42) | @Override
method clearAlert (line 47) | @Override
method checkAlert (line 52) | @Override
FILE: src/test/java/com/lmax/disruptor/support/DummyWaitStrategy.java
class DummyWaitStrategy (line 9) | public class DummyWaitStrategy implements WaitStrategy
method waitFor (line 13) | @Override
method signalAllWhenBlocking (line 21) | @Override
FILE: src/test/java/com/lmax/disruptor/support/LongEvent.java
class LongEvent (line 20) | public class LongEvent
method set (line 24) | public void set(final long value)
method get (line 29) | public long get()
FILE: src/test/java/com/lmax/disruptor/support/SequenceUpdater.java
class SequenceUpdater (line 24) | class SequenceUpdater implements Runnable
method SequenceUpdater (line 31) | SequenceUpdater(final long sleepTime, final WaitStrategy waitStrategy)
method run (line 37) | @Override
method waitForStartup (line 56) | public void waitForStartup() throws InterruptedException, BrokenBarrie...
FILE: src/test/java/com/lmax/disruptor/support/StubEvent.java
class StubEvent (line 21) | public final class StubEvent
method StubEvent (line 31) | public StubEvent(final int i)
method copy (line 36) | public void copy(final StubEvent event)
method getValue (line 41) | public int getValue()
method setValue (line 46) | public void setValue(final int value)
method getTestString (line 51) | public String getTestString()
method setTestString (line 56) | public void setTestString(final String testString)
method equals (line 63) | @Override
method hashCode (line 84) | @Override
FILE: src/test/java/com/lmax/disruptor/support/TestEvent.java
class TestEvent (line 20) | public final class TestEvent
method toString (line 22) | @Override
FILE: src/test/java/com/lmax/disruptor/support/TestWaiter.java
class TestWaiter (line 26) | public final class TestWaiter implements Callable<List<StubEvent>>
method TestWaiter (line 34) | public TestWaiter(
method call (line 48) | @Override
FILE: src/test/java/com/lmax/disruptor/support/WaitStrategyTestUtil.java
class WaitStrategyTestUtil (line 30) | public class WaitStrategyTestUtil
method assertWaitForWithDelayOf (line 34) | public static void assertWaitForWithDelayOf(final long sleepTimeMillis...
FILE: src/test/java/com/lmax/disruptor/util/MutableLong.java
class MutableLong (line 21) | public class MutableLong
method MutableLong (line 28) | public MutableLong()
method MutableLong (line 37) | public MutableLong(final long initialValue)
method get (line 47) | public long get()
method set (line 57) | public void set(final long value)
method increment (line 65) | public void increment()
FILE: src/test/java/com/lmax/disruptor/util/PaddedLong.java
class PaddedLong (line 21) | public final class PaddedLong extends MutableLong
method PaddedLong (line 28) | public PaddedLong()
method PaddedLong (line 37) | public PaddedLong(final long initialValue)
method sumPaddingToPreventOptimisation (line 42) | public long sumPaddingToPreventOptimisation()
FILE: src/test/java/com/lmax/disruptor/util/UnsafeAccess.java
class UnsafeAccess (line 7) | public class UnsafeAccess
method getUnsafe (line 36) | public static sun.misc.Unsafe getUnsafe()
FILE: src/test/java/com/lmax/disruptor/util/UtilTest.java
class UtilTest (line 24) | public final class UtilTest
method shouldReturnNextPowerOfTwo (line 26) | @Test
method shouldReturnExactPowerOfTwo (line 34) | @Test
method shouldReturnMinimumSequence (line 42) | @Test
method shouldReturnLongMaxWhenNoEventProcessors (line 49) | @Test
method shouldThrowErrorIfValuePassedToLog2FunctionIsNotPositive (line 57) | @Test
method shouldCalculateCorrectlyIntegerFlooredLog2 (line 65) | @Test
Condensed preview — 283 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,172K chars).
[
{
"path": ".editorconfig",
"chars": 33430,
"preview": "# noinspection EditorConfigKeyCorrectness\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_size = 4\nindent_style = space\ninse"
},
{
"path": ".githooks/pre-commit",
"chars": 264,
"preview": "#!/bin/sh\nset -e\n\n# stash any unstaged changes\ngit stash push -m \"prePush\" -q --keep-index\n\n# unstash the unstashed chan"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 678,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the b"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 502,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
},
{
"path": ".github/workflows/asciidoc-build-only.yml",
"chars": 539,
"preview": "name: Generate Documentation from ASCIIDoc\n\non:\n push:\n branches-ignore: [ master ]\n pull_request:\n branches: [ "
},
{
"path": ".github/workflows/asciidoc.yml",
"chars": 669,
"preview": "name: Generate Github Pages from ASCIIDoc\n\non:\n push:\n branches: [ master ]\n\npermissions:\n contents: write\n\njobs:\n "
},
{
"path": ".github/workflows/codeql-analysis.yml",
"chars": 835,
"preview": "name: \"CodeQL\"\n\non:\n push:\n branches: [ master ]\n pull_request:\n branches: [ master ]\n schedule:\n - cron: '3"
},
{
"path": ".github/workflows/gradle-build.yml",
"chars": 731,
"preview": "name: Java CI with Gradle\n\non: [ push, pull_request ]\n\njobs:\n build:\n runs-on: ubuntu-latest\n strategy:\n mat"
},
{
"path": ".github/workflows/gradle-wrapper-validation.yml",
"chars": 223,
"preview": "name: \"Validate Gradle Wrapper\"\non: [push, pull_request]\n\njobs:\n validation:\n name: \"Validation\"\n runs-on: ubuntu"
},
{
"path": ".github/workflows/jcstress-manual.yml",
"chars": 924,
"preview": "name: JCStress Testing - manual testing\n\non:\n workflow_dispatch:\n inputs :\n mode :\n description : 'JCStr"
},
{
"path": ".github/workflows/jcstress-quick.yml",
"chars": 748,
"preview": "name: JCStress Testing - commit-level quick check\n\non: [ push, pull_request ]\n\njobs:\n build:\n runs-on: ubuntu-latest"
},
{
"path": ".gitignore",
"chars": 222,
"preview": "/bin\n/build\n/.gradle\n/out\n.DS_Store\n*~\nclasses\ncode\ntemplib\nSConstruct\n.*dblite\npom.xml\n.project\n.classpath\n.settings\n.i"
},
{
"path": ".lgtm.yml",
"chars": 54,
"preview": "extraction:\n java:\n index:\n java_version: 11\n"
},
{
"path": "CHANGELOG.adoc",
"chars": 105,
"preview": ":Author: LMAX Development Team\n:Email:\n:Date: {docdata}\n\ninclude::./src/docs/asciidoc/en/changelog.adoc[]"
},
{
"path": "LICENCE.txt",
"chars": 11355,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "README.adoc",
"chars": 1228,
"preview": "= LMAX Disruptor\n\nimage:https://github.com/LMAX-Exchange/disruptor/workflows/Java%20CI%20with%20Gradle/badge.svg[Java CI"
},
{
"path": "build.gradle",
"chars": 3825,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "config/checkstyle/checkstyle.xml",
"chars": 6784,
"preview": "<?xml version=\"1.0\"?>\n<!DOCTYPE module PUBLIC\n \"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN\"\n \"htt"
},
{
"path": "config/checkstyle/suppress.xml",
"chars": 809,
"preview": "<?xml version=\"1.0\"?>\n<!DOCTYPE suppressions PUBLIC\n \"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN\""
},
{
"path": "gradle/asciidoc.gradle",
"chars": 901,
"preview": "//\n// Configure ASCIIDoc publishing\n//\n\nasciidoctor {\n languages 'en'\n resources {\n from(javadoc) {\n "
},
{
"path": "gradle/jcstress.gradle",
"chars": 196,
"preview": "//\n// Configure JCStress\n//\n\njcstress {\n jcstressDependency 'org.openjdk.jcstress:jcstress-core:0.11'\n includeTest"
},
{
"path": "gradle/jmh.gradle",
"chars": 1011,
"preview": "//\n// Configure JMH benchmarks\n//\n\nsourceSets {\n jmh {\n compileClasspath += sourceSets.main.output + sourceSet"
},
{
"path": "gradle/maven.gradle",
"chars": 1554,
"preview": "//\n// Configure publishing to Maven\n//\n\njava {\n withJavadocJar()\n withSourcesJar()\n}\n\npublishing {\n publication"
},
{
"path": "gradle/perf.gradle",
"chars": 605,
"preview": "//\n// Configure setting up performance tests\n//\n\nsourceSets {\n perftest {\n compileClasspath += sourceSets.main"
},
{
"path": "gradle/wrapper/gradle-wrapper.properties",
"chars": 251,
"preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributi"
},
{
"path": "gradlew",
"chars": 8739,
"preview": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "gradlew.bat",
"chars": 2966,
"preview": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (th"
},
{
"path": "settings.gradle",
"chars": 31,
"preview": "rootProject.name = 'disruptor'\n"
},
{
"path": "src/docs/asciidoc/en/changelog.adoc",
"chars": 13080,
"preview": ":Author: LMAX Development Team\n:Email:\n:Date: {docdata}\n\n= Changelog\n\n== 4.0.0\n\n* Minimum Java version now 11\n* Issue #3"
},
{
"path": "src/docs/asciidoc/en/developer-guide/10_getting_and_building.adoc",
"chars": 761,
"preview": "= Getting & Building the Disruptor\n\n:Author: LMAX Development Team\n:Email:\n:Date: {docdata}\n\nA guide to checking out the"
},
{
"path": "src/docs/asciidoc/en/developer-guide/20_performance_tests.adoc",
"chars": 2643,
"preview": "= Disruptor Performance Tests\n\n:Author: LMAX Development Team\n:Email:\n:Date: {docdata}\n\n== Run the performance tests\n\nWh"
},
{
"path": "src/docs/asciidoc/en/developer-guide/25_jsctress_tests.adoc",
"chars": 525,
"preview": "= jcstress Tests\n\n:Author: LMAX Development Team\n:Email:\n:Date: {docdata}\n\nhttps://github.com/openjdk/jcstress/\n\n> The J"
},
{
"path": "src/docs/asciidoc/en/developer-guide/30_publishing_release.adoc",
"chars": 3893,
"preview": "= Publishing Release\n\n:Author: LMAX Development Team\n:Email:\n:Date: {docdata}\n\n== Prerequisites\n\n1. All tests should be "
},
{
"path": "src/docs/asciidoc/en/developer-guide/90_tips.adoc",
"chars": 949,
"preview": "= Development tips\n\n:Author: LMAX Development Team\n:Email:\n:Date: {docdata}\n\n== Git Hooks\n\nThis project uses GitHub Acti"
},
{
"path": "src/docs/asciidoc/en/developer-guide/index.adoc",
"chars": 584,
"preview": "= LMAX Disruptor Developer Guide\n\n:Author: LMAX Development Team\n:Email:\n:Date: {docdata}\n:xrefstyle: short\n\nLMAX welcom"
},
{
"path": "src/docs/asciidoc/en/disruptor.adoc",
"chars": 37718,
"preview": "= LMAX Disruptor: High performance alternative to bounded queues for exchanging data between concurrent threads\nMartin T"
},
{
"path": "src/docs/asciidoc/en/index.adoc",
"chars": 4541,
"preview": "= LMAX Disruptor\nHigh Performance Inter-Thread Messaging Library\n\n:Author: LMAX Development Team\n:Email:\n:Date: {docdata"
},
{
"path": "src/docs/asciidoc/en/user-guide/10_using_the_disruptor.adoc",
"chars": 21871,
"preview": "= Using the Disruptor\n\n:Author: LMAX Development Team\n:Email:\n:Date: {docdata}\n\n// If you're changing these, also check "
},
{
"path": "src/docs/asciidoc/en/user-guide/20_design_and_implementation.adoc",
"chars": 240,
"preview": "= Design and Implementation\n\n:Author: LMAX Development Team\n:Email:\n:Date: {docdata}\n\n// If you're changing these, also "
},
{
"path": "src/docs/asciidoc/en/user-guide/30_known_issues.adoc",
"chars": 320,
"preview": "= Known Issues\n\n:Author: LMAX Development Team\n:Email:\n:Date: {docdata}\n\n// If you're changing these, also check out asc"
},
{
"path": "src/docs/asciidoc/en/user-guide/40_batch_rewind_use_case.adoc",
"chars": 2295,
"preview": "= Batch Rewind\n\n:Author: LMAX Development Team\n:Email:\n:Date: {docdata}\n\n== The Feature\n\nWhen using the `BatchEventProce"
},
{
"path": "src/docs/asciidoc/en/user-guide/index.adoc",
"chars": 730,
"preview": "= LMAX Disruptor User Guide\n\n:Author: LMAX Development Team\n:Email:\n:Date: {docdata}\n\n// If you're changing these, also "
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/DynamicallyAddHandler.java",
"chars": 2622,
"preview": "package com.lmax.disruptor.examples;\n\nimport com.lmax.disruptor.BatchEventProcessor;\nimport com.lmax.disruptor.BatchEven"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/EarlyReleaseHandler.java",
"chars": 1421,
"preview": "package com.lmax.disruptor.examples;\n\nimport com.lmax.disruptor.EventHandler;\nimport com.lmax.disruptor.Sequence;\nimport"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/HandleExceptionOnTranslate.java",
"chars": 1673,
"preview": "package com.lmax.disruptor.examples;\n\nimport com.lmax.disruptor.EventHandler;\nimport com.lmax.disruptor.EventTranslator;"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/KeyedBatching.java",
"chars": 940,
"preview": "package com.lmax.disruptor.examples;\n\nimport com.lmax.disruptor.EventHandler;\n\nimport java.util.ArrayList;\nimport java.u"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/MultiProducerWithTranslator.java",
"chars": 2895,
"preview": "package com.lmax.disruptor.examples;\n\nimport com.lmax.disruptor.BlockingWaitStrategy;\nimport com.lmax.disruptor.EventFac"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/NamedEventHandler.java",
"chars": 702,
"preview": "package com.lmax.disruptor.examples;\n\nimport com.lmax.disruptor.EventHandler;\n\npublic class NamedEventHandler<T> impleme"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/Pipeliner.java",
"chars": 2599,
"preview": "package com.lmax.disruptor.examples;\n\nimport com.lmax.disruptor.EventFactory;\nimport com.lmax.disruptor.EventHandler;\nim"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/PullWithBatchedPoller.java",
"chars": 4203,
"preview": "package com.lmax.disruptor.examples;\n\nimport com.lmax.disruptor.EventFactory;\nimport com.lmax.disruptor.EventPoller;\nimp"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/PullWithPoller.java",
"chars": 1601,
"preview": "package com.lmax.disruptor.examples;\n\nimport com.lmax.disruptor.EventFactory;\nimport com.lmax.disruptor.EventPoller;\nimp"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/SequentialThreeConsumers.java",
"chars": 756,
"preview": "package com.lmax.disruptor.examples;\n\nimport com.lmax.disruptor.dsl.Disruptor;\nimport com.lmax.disruptor.util.DaemonThre"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/ShutdownOnError.java",
"chars": 2782,
"preview": "package com.lmax.disruptor.examples;\n\nimport com.lmax.disruptor.EventFactory;\nimport com.lmax.disruptor.EventHandler;\nim"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/ThreeToOneDisruptor.java",
"chars": 2109,
"preview": "package com.lmax.disruptor.examples;\n\n\nimport com.lmax.disruptor.EventFactory;\nimport com.lmax.disruptor.EventHandler;\ni"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/WaitForProcessing.java",
"chars": 2026,
"preview": "package com.lmax.disruptor.examples;\n\nimport com.lmax.disruptor.EventHandler;\nimport com.lmax.disruptor.EventTranslator;"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/WaitForShutdown.java",
"chars": 1694,
"preview": "package com.lmax.disruptor.examples;\n\nimport com.lmax.disruptor.EventHandler;\nimport com.lmax.disruptor.TimeoutException"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/longevent/LongEvent.java",
"chars": 317,
"preview": "package com.lmax.disruptor.examples.longevent;\n\n// tag::example[]\npublic class LongEvent\n{\n private long value;\n\n "
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/longevent/LongEventFactory.java",
"chars": 286,
"preview": "package com.lmax.disruptor.examples.longevent;\n\nimport com.lmax.disruptor.EventFactory;\n\n// tag::example[]\npublic class "
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/longevent/LongEventHandler.java",
"chars": 342,
"preview": "package com.lmax.disruptor.examples.longevent;\n\nimport com.lmax.disruptor.EventHandler;\n\n// tag::example[]\npublic class "
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/longevent/LongEventProducer.java",
"chars": 841,
"preview": "package com.lmax.disruptor.examples.longevent;\n\n// tag::example[]\n\nimport com.lmax.disruptor.EventTranslatorOneArg;\nimpo"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/longevent/LongEventProducerWithTranslator.java",
"chars": 868,
"preview": "package com.lmax.disruptor.examples.longevent;\n\n// tag::example[]\nimport com.lmax.disruptor.RingBuffer;\nimport com.lmax."
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/longevent/lambdas/LongEventMain.java",
"chars": 1099,
"preview": "package com.lmax.disruptor.examples.longevent.lambdas;\n\n// tag::example[]\nimport com.lmax.disruptor.dsl.Disruptor;\nimpor"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/longevent/legacy/LongEventMain.java",
"chars": 1181,
"preview": "package com.lmax.disruptor.examples.longevent.legacy;\n\n// tag::example[]\nimport com.lmax.disruptor.RingBuffer;\nimport co"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/longevent/legacy/LongEventProducer.java",
"chars": 735,
"preview": "package com.lmax.disruptor.examples.longevent.legacy;\n\n// tag::example[]\nimport com.lmax.disruptor.RingBuffer;\nimport co"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/longevent/methodrefs/LongEventMain.java",
"chars": 1244,
"preview": "package com.lmax.disruptor.examples.longevent.methodrefs;\n\n// tag::example[]\n\nimport com.lmax.disruptor.RingBuffer;\nimpo"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/objectevent/ClearingEventHandler.java",
"chars": 344,
"preview": "package com.lmax.disruptor.examples.objectevent;\n\n// tag::example[]\nimport com.lmax.disruptor.EventHandler;\n\npublic clas"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/objectevent/Main.java",
"chars": 636,
"preview": "package com.lmax.disruptor.examples.objectevent;\n\nimport com.lmax.disruptor.dsl.Disruptor;\nimport com.lmax.disruptor.uti"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/objectevent/ObjectEvent.java",
"chars": 171,
"preview": "package com.lmax.disruptor.examples.objectevent;\n\n// tag::example[]\nclass ObjectEvent<T>\n{\n T val;\n\n void clear()\n"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/objectevent/ProcessingEventHandler.java",
"chars": 298,
"preview": "package com.lmax.disruptor.examples.objectevent;\n\nimport com.lmax.disruptor.EventHandler;\n\npublic class ProcessingEventH"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/support/LongEvent.java",
"chars": 348,
"preview": "package com.lmax.disruptor.examples.support;\n\nimport com.lmax.disruptor.EventFactory;\n\npublic class LongEvent\n{\n publ"
},
{
"path": "src/examples/java/com/lmax/disruptor/examples/support/StubEvent.java",
"chars": 2279,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/jcstress/java/com/lmax/disruptor/LoggerInitializationStress.java",
"chars": 4753,
"preview": "package com.lmax.disruptor;\n\nimport com.lmax.disruptor.dsl.Disruptor;\nimport com.lmax.disruptor.dsl.ProducerType;\nimport"
},
{
"path": "src/jcstress/java/com/lmax/disruptor/MultiProducerSequencerUnsafeStress.java",
"chars": 4039,
"preview": "package com.lmax.disruptor;\n\nimport com.lmax.disruptor.alternatives.MultiProducerSequencerUnsafe;\nimport org.openjdk.jcs"
},
{
"path": "src/jcstress/java/com/lmax/disruptor/MultiProducerSequencerVarHandleStress.java",
"chars": 3736,
"preview": "package com.lmax.disruptor;\n\nimport com.lmax.disruptor.alternatives.MultiProducerSequencerVarHandle;\nimport org.openjdk."
},
{
"path": "src/jcstress/java/com/lmax/disruptor/SequenceStressUnsafe.java",
"chars": 11030,
"preview": "package com.lmax.disruptor;\n\nimport com.lmax.disruptor.alternatives.SequenceUnsafe;\nimport org.openjdk.jcstress.annotati"
},
{
"path": "src/jcstress/java/com/lmax/disruptor/SequenceStressVarHandle.java",
"chars": 11141,
"preview": "package com.lmax.disruptor;\n\nimport com.lmax.disruptor.alternatives.SequenceVarHandle;\nimport org.openjdk.jcstress.annot"
},
{
"path": "src/jcstress/java/com/lmax/disruptor/SequenceStressVarHandleBarrier.java",
"chars": 11432,
"preview": "package com.lmax.disruptor;\n\nimport com.lmax.disruptor.alternatives.SequenceVarHandleBarrier;\nimport org.openjdk.jcstres"
},
{
"path": "src/jmh/java/com/lmax/disruptor/ArrayAccessBenchmark.java",
"chars": 5781,
"preview": "package com.lmax.disruptor;\n\nimport com.lmax.disruptor.util.SimpleEvent;\nimport com.lmax.disruptor.util.UnsafeAccess;\nim"
},
{
"path": "src/jmh/java/com/lmax/disruptor/BlockingQueueBenchmark.java",
"chars": 2715,
"preview": "package com.lmax.disruptor;\n\nimport com.lmax.disruptor.util.Constants;\nimport com.lmax.disruptor.util.DaemonThreadFactor"
},
{
"path": "src/jmh/java/com/lmax/disruptor/MultiProducerSequencerBenchmark.java",
"chars": 7110,
"preview": "package com.lmax.disruptor;\n\nimport com.lmax.disruptor.alternatives.MultiProducerSequencerUnsafe;\nimport com.lmax.disrup"
},
{
"path": "src/jmh/java/com/lmax/disruptor/MultiProducerSingleConsumer.java",
"chars": 2768,
"preview": "package com.lmax.disruptor;\n\nimport com.lmax.disruptor.dsl.Disruptor;\nimport com.lmax.disruptor.dsl.ProducerType;\nimport"
},
{
"path": "src/jmh/java/com/lmax/disruptor/RingBufferBenchmark.java",
"chars": 5778,
"preview": "package com.lmax.disruptor;\n\nimport com.lmax.disruptor.alternatives.RingBufferArray;\nimport com.lmax.disruptor.alternati"
},
{
"path": "src/jmh/java/com/lmax/disruptor/RingBufferFalseSharingBenchmark.java",
"chars": 21889,
"preview": "package com.lmax.disruptor;\n\nimport com.lmax.disruptor.util.SimpleEvent;\nimport org.openjdk.jmh.annotations.Benchmark;\ni"
},
{
"path": "src/jmh/java/com/lmax/disruptor/SequenceBenchmark.java",
"chars": 13172,
"preview": "package com.lmax.disruptor;\n\nimport com.lmax.disruptor.alternatives.SequenceDoublePadded;\nimport com.lmax.disruptor.alte"
},
{
"path": "src/jmh/java/com/lmax/disruptor/SingleProducerSingleConsumer.java",
"chars": 2209,
"preview": "package com.lmax.disruptor;\n\nimport com.lmax.disruptor.dsl.Disruptor;\nimport com.lmax.disruptor.dsl.ProducerType;\nimport"
},
{
"path": "src/jmh/java/com/lmax/disruptor/util/Constants.java",
"chars": 168,
"preview": "package com.lmax.disruptor.util;\n\npublic class Constants\n{\n public static final int RINGBUFFER_SIZE = 1 << 20;\n pu"
},
{
"path": "src/jmh/java/com/lmax/disruptor/util/SimpleEvent.java",
"chars": 394,
"preview": "package com.lmax.disruptor.util;\n\npublic class SimpleEvent\n{\n private long value = Long.MIN_VALUE;\n\n public long g"
},
{
"path": "src/jmh/java/com/lmax/disruptor/util/SimpleEventHandler.java",
"chars": 455,
"preview": "package com.lmax.disruptor.util;\n\nimport com.lmax.disruptor.EventHandler;\nimport org.openjdk.jmh.infra.Blackhole;\n\npubli"
},
{
"path": "src/main/java/com/lmax/disruptor/AbstractSequencer.java",
"chars": 4254,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/AggregateEventHandler.java",
"chars": 1929,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/AlertException.java",
"chars": 1415,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/BatchEventProcessor.java",
"chars": 9484,
"preview": "/*\n * Copyright 2022 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/BatchEventProcessorBuilder.java",
"chars": 3700,
"preview": "/*\n * Copyright 2023 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/BatchRewindStrategy.java",
"chars": 562,
"preview": "package com.lmax.disruptor;\n\n/**\n * Strategy for handling a rewindableException when processing an event.\n */\npublic int"
},
{
"path": "src/main/java/com/lmax/disruptor/BlockingWaitStrategy.java",
"chars": 1992,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/BusySpinWaitStrategy.java",
"chars": 1495,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/Cursored.java",
"chars": 1071,
"preview": "/*\n * Copyright 2012 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/DataProvider.java",
"chars": 964,
"preview": "/*\n * Copyright 2012 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/EventFactory.java",
"chars": 1078,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/EventHandler.java",
"chars": 2950,
"preview": "/*\n * Copyright 2022 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/EventHandlerBase.java",
"chars": 2949,
"preview": "/*\n * Copyright 2022 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/EventHandlerIdentity.java",
"chars": 71,
"preview": "package com.lmax.disruptor;\n\npublic interface EventHandlerIdentity\n{\n}\n"
},
{
"path": "src/main/java/com/lmax/disruptor/EventPoller.java",
"chars": 5998,
"preview": "package com.lmax.disruptor;\n\n/**\n * Experimental poll-based interface for the Disruptor. Unlike a {@link BatchEventProce"
},
{
"path": "src/main/java/com/lmax/disruptor/EventProcessor.java",
"chars": 1771,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/EventSequencer.java",
"chars": 233,
"preview": "package com.lmax.disruptor;\n\n/**\n * Pulls together the low-level data access and sequencing operations of {@link RingBuf"
},
{
"path": "src/main/java/com/lmax/disruptor/EventSink.java",
"chars": 18619,
"preview": "package com.lmax.disruptor;\n\n/**\n * Write interface for {@link RingBuffer}.\n * @param <E> The event type\n */\npublic inte"
},
{
"path": "src/main/java/com/lmax/disruptor/EventTranslator.java",
"chars": 1400,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/EventTranslatorOneArg.java",
"chars": 1331,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/EventTranslatorThreeArg.java",
"chars": 1643,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/EventTranslatorTwoArg.java",
"chars": 1487,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/EventTranslatorVararg.java",
"chars": 1245,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/EventuallyGiveUpBatchRewindStrategy.java",
"chars": 860,
"preview": "package com.lmax.disruptor;\n\n/**\n * <p>Strategy for handling a rewindableException that will eventually delegate the exc"
},
{
"path": "src/main/java/com/lmax/disruptor/ExceptionHandler.java",
"chars": 1878,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/ExceptionHandlers.java",
"chars": 1493,
"preview": "/*\n * Copyright 2021 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/FatalExceptionHandler.java",
"chars": 1666,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/FixedSequenceGroup.java",
"chars": 2108,
"preview": "/*\n * Copyright 2012 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/IgnoreExceptionHandler.java",
"chars": 1566,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/InsufficientCapacityException.java",
"chars": 1370,
"preview": "/*\n * Copyright 2012 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/LiteBlockingWaitStrategy.java",
"chars": 2552,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/LiteTimeoutBlockingWaitStrategy.java",
"chars": 2312,
"preview": "package com.lmax.disruptor;\n\nimport java.util.concurrent.TimeUnit;\nimport java.util.concurrent.atomic.AtomicBoolean;\n\nim"
},
{
"path": "src/main/java/com/lmax/disruptor/MultiProducerSequencer.java",
"chars": 8640,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/NanosecondPauseBatchRewindStrategy.java",
"chars": 906,
"preview": "package com.lmax.disruptor;\n\nimport java.util.concurrent.locks.LockSupport;\n\n/**\n * <p>Strategy for handling a rewindabl"
},
{
"path": "src/main/java/com/lmax/disruptor/NoOpEventProcessor.java",
"chars": 2279,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/PhasedBackoffWaitStrategy.java",
"chars": 5137,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/ProcessingSequenceBarrier.java",
"chars": 2637,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/RewindAction.java",
"chars": 383,
"preview": "package com.lmax.disruptor;\n\n/**\n * The result returned from the {@link BatchRewindStrategy} that decides whether to rew"
},
{
"path": "src/main/java/com/lmax/disruptor/RewindHandler.java",
"chars": 775,
"preview": "/*\n * Copyright 2023 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/RewindableEventHandler.java",
"chars": 2426,
"preview": "/*\n * Copyright 2022 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/RewindableException.java",
"chars": 522,
"preview": "package com.lmax.disruptor;\n\n/**\n * A special exception that can be thrown while using the {@link BatchEventProcessor}.\n"
},
{
"path": "src/main/java/com/lmax/disruptor/RingBuffer.java",
"chars": 40687,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/Sequence.java",
"chars": 4480,
"preview": "package com.lmax.disruptor;\n\n\nimport java.lang.invoke.MethodHandles;\nimport java.lang.invoke.VarHandle;\n\nclass LhsPaddin"
},
{
"path": "src/main/java/com/lmax/disruptor/SequenceBarrier.java",
"chars": 2104,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/SequenceGroup.java",
"chars": 4056,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/SequenceGroups.java",
"chars": 3206,
"preview": "/*\n * Copyright 2012 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/Sequenced.java",
"chars": 3024,
"preview": "package com.lmax.disruptor;\n\n/**\n * Operations related to the sequencing of items in a {@link RingBuffer}.\n * See the tw"
},
{
"path": "src/main/java/com/lmax/disruptor/Sequencer.java",
"chars": 3887,
"preview": "/*\n * Copyright 2012 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/SimpleBatchRewindStrategy.java",
"chars": 321,
"preview": "package com.lmax.disruptor;\n\n/**\n * Batch rewind strategy that always rewinds\n */\npublic class SimpleBatchRewindStrategy"
},
{
"path": "src/main/java/com/lmax/disruptor/SingleProducerSequencer.java",
"chars": 8456,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/SleepingWaitStrategy.java",
"chars": 3224,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/TimeoutBlockingWaitStrategy.java",
"chars": 2408,
"preview": "package com.lmax.disruptor;\n\nimport java.util.concurrent.TimeUnit;\n\nimport static com.lmax.disruptor.util.Util.awaitNano"
},
{
"path": "src/main/java/com/lmax/disruptor/TimeoutException.java",
"chars": 633,
"preview": "package com.lmax.disruptor;\n\n/**\n * Wait strategies may throw this Exception to inform callers that a\n * message has not"
},
{
"path": "src/main/java/com/lmax/disruptor/WaitStrategy.java",
"chars": 2319,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/YieldingWaitStrategy.java",
"chars": 1898,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/dsl/ConsumerInfo.java",
"chars": 402,
"preview": "package com.lmax.disruptor.dsl;\n\nimport com.lmax.disruptor.Sequence;\nimport com.lmax.disruptor.SequenceBarrier;\n\nimport "
},
{
"path": "src/main/java/com/lmax/disruptor/dsl/ConsumerRepository.java",
"chars": 4489,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/dsl/Disruptor.java",
"chars": 24372,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/dsl/EventHandlerGroup.java",
"chars": 9304,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/dsl/EventProcessorFactory.java",
"chars": 1009,
"preview": "package com.lmax.disruptor.dsl;\n\nimport com.lmax.disruptor.EventProcessor;\nimport com.lmax.disruptor.RingBuffer;\nimport "
},
{
"path": "src/main/java/com/lmax/disruptor/dsl/EventProcessorInfo.java",
"chars": 2385,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/dsl/ExceptionHandlerSetting.java",
"chars": 2327,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/dsl/ExceptionHandlerWrapper.java",
"chars": 1344,
"preview": "package com.lmax.disruptor.dsl;\n\nimport com.lmax.disruptor.ExceptionHandler;\nimport com.lmax.disruptor.ExceptionHandlers"
},
{
"path": "src/main/java/com/lmax/disruptor/dsl/ProducerType.java",
"chars": 973,
"preview": "/*\n * Copyright 2012 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/dsl/package-info.java",
"chars": 1005,
"preview": "/**\n * A DSL-style API for setting up the disruptor pattern around a ring buffer.\n *\n * <h2>Example code</h2>\n * <pre>{@"
},
{
"path": "src/main/java/com/lmax/disruptor/package-info.java",
"chars": 7863,
"preview": "/**\n * The Disruptor is a concurrent programming framework for exchanging and coordinating work as a continuous series o"
},
{
"path": "src/main/java/com/lmax/disruptor/util/DaemonThreadFactory.java",
"chars": 1033,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/util/ThreadHints.java",
"chars": 1866,
"preview": "/* Copyright 2016 Gil Tene\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use thi"
},
{
"path": "src/main/java/com/lmax/disruptor/util/Util.java",
"chars": 4100,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/main/java/com/lmax/disruptor/util/package-info.java",
"chars": 59,
"preview": "/**\n * Utility classes\n */\npackage com.lmax.disruptor.util;"
},
{
"path": "src/main/java/module-info.java",
"chars": 135,
"preview": "module com.lmax.disruptor {\n exports com.lmax.disruptor;\n exports com.lmax.disruptor.dsl;\n exports com.lmax.dis"
},
{
"path": "src/perftest/java/com/lmax/disruptor/AbstractPerfTestDisruptor.java",
"chars": 2483,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/AbstractPerfTestQueue.java",
"chars": 2069,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/PerfTestContext.java",
"chars": 1074,
"preview": "package com.lmax.disruptor;\n\npublic class PerfTestContext\n{\n private long disruptorOps;\n private long batchesProce"
},
{
"path": "src/perftest/java/com/lmax/disruptor/immutable/Constants.java",
"chars": 172,
"preview": "package com.lmax.disruptor.immutable;\n\npublic class Constants\n{\n public static final long ITERATIONS = 1000 * 1000 * "
},
{
"path": "src/perftest/java/com/lmax/disruptor/immutable/CustomPerformanceTest.java",
"chars": 1435,
"preview": "package com.lmax.disruptor.immutable;\n\nimport com.lmax.disruptor.BatchEventProcessor;\nimport com.lmax.disruptor.SinglePr"
},
{
"path": "src/perftest/java/com/lmax/disruptor/immutable/CustomRingBuffer.java",
"chars": 2411,
"preview": "package com.lmax.disruptor.immutable;\n\nimport com.lmax.disruptor.BatchEventProcessor;\nimport com.lmax.disruptor.BatchEve"
},
{
"path": "src/perftest/java/com/lmax/disruptor/immutable/EventAccessor.java",
"chars": 104,
"preview": "package com.lmax.disruptor.immutable;\n\npublic interface EventAccessor<T>\n{\n T take(long sequence);\n}\n"
},
{
"path": "src/perftest/java/com/lmax/disruptor/immutable/EventHolder.java",
"chars": 219,
"preview": "package com.lmax.disruptor.immutable;\n\nimport com.lmax.disruptor.EventFactory;\n\npublic class EventHolder\n{\n\n public s"
},
{
"path": "src/perftest/java/com/lmax/disruptor/immutable/EventHolderHandler.java",
"chars": 558,
"preview": "package com.lmax.disruptor.immutable;\n\nimport com.lmax.disruptor.EventHandler;\n\npublic class EventHolderHandler implemen"
},
{
"path": "src/perftest/java/com/lmax/disruptor/immutable/SimpleEvent.java",
"chars": 567,
"preview": "package com.lmax.disruptor.immutable;\n\npublic class SimpleEvent\n{\n private final long id;\n private final long v1;\n"
},
{
"path": "src/perftest/java/com/lmax/disruptor/immutable/SimpleEventHandler.java",
"chars": 345,
"preview": "package com.lmax.disruptor.immutable;\n\nimport com.lmax.disruptor.EventHandler;\n\npublic class SimpleEventHandler implemen"
},
{
"path": "src/perftest/java/com/lmax/disruptor/immutable/SimplePerformanceTest.java",
"chars": 2024,
"preview": "package com.lmax.disruptor.immutable;\n\nimport com.lmax.disruptor.BatchEventProcessor;\nimport com.lmax.disruptor.BatchEve"
},
{
"path": "src/perftest/java/com/lmax/disruptor/offheap/OneToOneOffHeapThroughputTest.java",
"chars": 6552,
"preview": "package com.lmax.disruptor.offheap;\n\nimport com.lmax.disruptor.AbstractPerfTestDisruptor;\nimport com.lmax.disruptor.Batc"
},
{
"path": "src/perftest/java/com/lmax/disruptor/offheap/OneToOneOnHeapThroughputTest.java",
"chars": 7492,
"preview": "package com.lmax.disruptor.offheap;\n\nimport com.lmax.disruptor.AbstractPerfTestDisruptor;\nimport com.lmax.disruptor.Batc"
},
{
"path": "src/perftest/java/com/lmax/disruptor/queue/OneToOneQueueBatchedThroughputTest.java",
"chars": 3249,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/queue/OneToOneQueueThroughputTest.java",
"chars": 3217,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/queue/OneToThreeDiamondQueueThroughputTest.java",
"chars": 6325,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/queue/OneToThreePipelineQueueThroughputTest.java",
"chars": 5232,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/queue/OneToThreeQueueThroughputTest.java",
"chars": 5014,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/queue/PingPongQueueLatencyTest.java",
"chars": 7104,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/queue/ThreeToOneQueueBatchThroughputTest.java",
"chars": 4178,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/queue/ThreeToOneQueueThroughputTest.java",
"chars": 4153,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/raw/OneToOneRawBatchThroughputTest.java",
"chars": 5440,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/raw/OneToOneRawThroughputTest.java",
"chars": 5320,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/sequenced/OneToOneSequencedBatchThroughputTest.java",
"chars": 5135,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/sequenced/OneToOneSequencedLongArrayThroughputTest.java",
"chars": 4976,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/sequenced/OneToOneSequencedPollerThroughputTest.java",
"chars": 6530,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/sequenced/OneToOneSequencedThroughputTest.java",
"chars": 4895,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/sequenced/OneToThreeDiamondSequencedThroughputTest.java",
"chars": 6324,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/sequenced/OneToThreePipelineSequencedThroughputTest.java",
"chars": 6809,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/sequenced/OneToThreeSequencedThroughputTest.java",
"chars": 6378,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/sequenced/PingPongSequencedLatencyTest.java",
"chars": 8285,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/sequenced/ThreeToOneSequencedBatchThroughputTest.java",
"chars": 5235,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/sequenced/ThreeToOneSequencedThroughputTest.java",
"chars": 5202,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/sequenced/ThreeToThreeSequencedThroughputTest.java",
"chars": 5334,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/support/EventCountingQueueProcessor.java",
"chars": 1620,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/support/FizzBuzzEvent.java",
"chars": 1376,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/support/FizzBuzzEventHandler.java",
"chars": 2243,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/support/FizzBuzzQueueProcessor.java",
"chars": 3554,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/support/FizzBuzzStep.java",
"chars": 690,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
},
{
"path": "src/perftest/java/com/lmax/disruptor/support/FunctionEvent.java",
"chars": 1662,
"preview": "/*\n * Copyright 2011 LMAX Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use "
}
]
// ... and 83 more files (download for full content)
About this extraction
This page contains the full source code of the LMAX-Exchange/disruptor GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 283 files (1.1 MB), approximately 256.4k tokens, and a symbol index with 2030 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.