コード例 #1
0
 public void start() {
   if (_thread == null || !_thread.isAlive()) {
     reset();
     _thread = new DataThread<V>(this);
     _thread.start();
   }
 }
コード例 #2
0
 public void stop() {
   if (_thread != null && _thread.isAlive()) {
     _thread.terminate();
     try {
       _thread.join();
     } catch (InterruptedException e) {
       log.warn("stopping interrupted");
     }
   }
 }
コード例 #3
0
 public long getEventCount() {
   DataThread<V> thread = _thread;
   if (thread != null) return _thread.getEventCount();
   else return 0;
 }
コード例 #4
0
 public void resume() {
   if (_thread != null) {
     _thread.resumeDataFeed();
   }
 }
コード例 #5
0
 public void pause() {
   if (_thread != null) {
     _thread.pauseDataFeed();
   }
 }
コード例 #6
0
 public String getStatus() {
   DataThread<V> thread = _thread;
   if (thread == null) return "dead";
   return thread.getStatus() + " : " + thread.getState();
 }
コード例 #7
0
 public void setMaxEventsPerMinute(long maxEventsPerMinute) {
   DataThread<V> thread = _thread;
   if (thread == null) return;
   thread.setMaxEventsPerMinute(maxEventsPerMinute);
 }
コード例 #8
0
 public long getMaxEventsPerMinute() {
   DataThread<V> thread = _thread;
   if (thread == null) return 0;
   return thread.getMaxEventsPerMinute();
 }
コード例 #9
0
 public void syncWthVersion(long timeInMillis, long version) throws ZoieException {
   _thread.syncWthVersion(timeInMillis, version);
 }