itm / wsn-device-drivers

Drivers for Wireless Sensor Network Devices
Other
6 stars 4 forks source link

Automatic flush of the SendOutputStreamWrapper #44

Closed mlegenhausen closed 13 years ago

mlegenhausen commented 13 years ago

Flush automatically the buffer when

  1. Buffer size was reached
  2. Timeout occured

Each instance of this wrapper needs his own ScheduledExecutorService.

mlegenhausen commented 13 years ago

Buffer size is set to 150 like the send operation. A ScheduledThreadExecutor is now needed for the DeviceAsync, cause the flush is scheduled by this executor. The flush time may vary from 50ms to 100ms.