incubator-s4-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthieu Morel <>
Subject Re: 回复: ontime()
Date Mon, 13 May 2013 15:14:20 GMT
Well it seems that your processing element is not thread safe. So why would you annotate it
with @ThreadSafe?


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

Hi,I annotated the PE subclass threadsafe.However,errors still come out,as below:
I don't know where I'm wrong.Can you help me ?
Thanks very much!
------------------ 原始邮件 ------------------
发件人: "Matthieu Morel"<<>>;
发送时间: 2013年5月13日(星期一) 下午5:27
收件人: "<<>>"<<>>;
主题: Re: ontime()


the thread safe annotation comes from "java concurrency in practice" APIs:

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,


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!


View raw message