1 Star 0 Fork 0

Kinkley / disruptor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

LMAX Disruptor

A High Performance Inter-Thread Messaging Library

Maintainer

Michael Barker

Build Status

Documentation

Changelog

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)
  • Bugfix for multi-threaded publishing to multiple ring buffers (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.
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.

简介

High Performance Inter-Thread Messaging Library 展开 收起
Java
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/jinxin.70/disruptor.git
git@gitee.com:jinxin.70/disruptor.git
jinxin.70
disruptor
disruptor
master

搜索帮助