The BasicOperationProcessor belongs to the BasicOperationService and is responsible for scheduling
operations/packets to the correct threads.
The actual processing of the 'task' that is scheduled, is forwarded to the
BasicDispatcher
. So
this class is purely responsible for assigning a 'task' to a particular thread.
The
execute(Object, int, boolean)
accepts an Object instead of a runnable to prevent needing to
create wrapper runnables around tasks. This is done to reduce the amount of object litter and therefor
reduce pressure on the gc.
There are 2 category of operation threads:
- partition specific operation threads: these threads are responsible for executing e.g. a map.put.
Operations for the same partition, always end up in the same thread.
-
generic operation threads: these threads are responsible for executing operations that are not
specific to a partition. E.g. a heart beat.