My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
* 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.
*/
package com.lmax.disruptor;

/**
* EventProcessors waitFor events to become available for consumption from the {@link RingBuffer}
*
* An EventProcessor will be associated with a Thread for execution.
*/
public interface EventProcessor extends Runnable
{
/**
* Get a reference to the {@link Sequence} being used by this {@link EventProcessor}.
*
* @return reference to the {@link Sequence} for this {@link EventProcessor}
*/
Sequence getSequence();

/**
* Signal that this EventProcessor should stop when it has finished consuming at the next clean break.
* It will call {@link SequenceBarrier#alert()} to notify the thread to check status.
*/
void halt();
}

Change log

r332 by mjpt777 on Sep 5, 2011   Diff
DependencyBarrier to SequenceBarrier name
change.
Go to: 
Project members, sign in to write a code review

Older revisions

r311 by mjpt777 on Sep 2, 2011   Diff
Removed AbstractEvent so any object
can be put into the RingBuffer, and
fixed some false sharing in the
performance tests to make them more
predictable.
r277 by mjpt777 on Aug 18, 2011   Diff
Removed redundant call to
getSequenceValue from EventProcessor
r276 by mjpt777 on Aug 16, 2011   Diff
Method renaming for accessing the
Sequence and its value within an
EventProcessor
All revisions of this file

File info

Size: 1302 bytes, 37 lines
Powered by Google Project Hosting