incubator-s4-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthieu Morel <matth...@yahoo-inc.com>
Subject Re: ontime()
Date Mon, 13 May 2013 09:27:22 GMT

Hi,

the thread safe annotation comes from "java concurrency in practice" APIs: http://jcip.net.s3-website-us-east-1.amazonaws.com/annotations/doc/index.html

Please check the isThreadSafe method in ProcessingElement for an explanation of implications
in S4. If the PE class is annotated with @ThreadSafe, the isThreadSafe() method will return
true and no lock will be taken on the PE when executing the "onTime" method (i.e. periodic
operation may run concurrently with the processing of on or multiple events).

Hope this helps,

Matthieu


On May 13, 2013, at 10:16 , 唐装鼠 wrote:

> Hi,I'm new to java and s4.
> in my project,I want to use the method onTime().
> The javadoc says theProcessingElement subclass must be annotated with ThreadSafe.
> However,I don't know how to annotate threadsafe.Can someone help me?
> Thanks!


Mime
View raw message