com.hazelcast.nio.tcp
Interface MigratableHandler

All Superinterfaces:
SelectionHandler
All Known Implementing Classes:
AbstractSelectionHandler, ReadHandler, WriteHandler

public interface MigratableHandler
extends SelectionHandler

Read/Write handlers that supports migration between IOSelector.


Method Summary
 long getEventCount()
          Get number of events recorded by the current handler.
 IOSelector getOwner()
          Get IOSelector currently owning this handler.
 void migrate(IOSelector newOwner)
          Migrate to a new IOSelector.
 
Methods inherited from interface com.hazelcast.nio.tcp.SelectionHandler
handle
 

Method Detail

migrate

void migrate(IOSelector newOwner)
Migrate to a new IOSelector.

Parameters:
newOwner -

getOwner

IOSelector getOwner()
Get IOSelector currently owning this handler. Handler owner is a thread running this handler. IOBalancer can decide to migrate a handler to another owner.

Returns:
current owner

getEventCount

long getEventCount()
Get number of events recorded by the current handler. It can be used to calculate whether this handler should be migrated to a different IOSelector

Returns:
total number of events recorded by this handler


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.