Class GridPortProcessor
- java.lang.Object
-
- org.apache.ignite.internal.processors.GridProcessorAdapter
-
- org.apache.ignite.internal.processors.port.GridPortProcessor
-
- All Implemented Interfaces:
GridComponent,GridProcessor
public class GridPortProcessor extends GridProcessorAdapter
Registers and deregisters all ports used by SPI and Manager.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.ignite.internal.GridComponent
GridComponent.DiscoveryDataExchangeType
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter
ctx, diagnosticLog, log
-
-
Constructor Summary
Constructors Constructor Description GridPortProcessor(GridKernalContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPortListener(GridPortListener lsnr)Add listener.voidderegisterPort(int port, IgnitePortProtocol proto, Class cls)Deregisters port used by passed class.voidderegisterPorts(Class cls)Deregisters all ports used by passed class.voidprintMemoryStats()Prints memory statistics (sizes of internal structures, etc.).Collection<GridPortRecord>records()Returns unmodifiable collections of records.voidregisterPort(int port, IgnitePortProtocol proto, Class cls)Registers port using by passed class.voidremovePortListener(GridPortListener lsnr)Remove listener.voidstart()Starts grid component.voidstop(boolean cancel)Stops grid component.-
Methods inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter
assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStop, onReconnected, toString, validateNode, validateNode
-
-
-
-
Constructor Detail
-
GridPortProcessor
public GridPortProcessor(GridKernalContext ctx)
- Parameters:
ctx- Kernal context.
-
-
Method Detail
-
start
public void start() throws IgniteCheckedExceptionStarts grid component.- Specified by:
startin interfaceGridComponent- Overrides:
startin classGridProcessorAdapter- Throws:
IgniteCheckedException- Throws in case of any errors.
-
stop
public void stop(boolean cancel) throws IgniteCheckedExceptionStops grid component.- Specified by:
stopin interfaceGridComponent- Overrides:
stopin classGridProcessorAdapter- Parameters:
cancel- Iftrue, then all ongoing tasks or jobs for relevant components need to be cancelled.- Throws:
IgniteCheckedException- Thrown in case of any errors.
-
registerPort
public void registerPort(int port, IgnitePortProtocol proto, Class cls)Registers port using by passed class.- Parameters:
port- Port.proto- Protocol.cls- Class.
-
deregisterPorts
public void deregisterPorts(Class cls)
Deregisters all ports used by passed class.- Parameters:
cls- Class.
-
deregisterPort
public void deregisterPort(int port, IgnitePortProtocol proto, Class cls)Deregisters port used by passed class.- Parameters:
port- Port.proto- Protocol.cls- Class.
-
records
public Collection<GridPortRecord> records()
Returns unmodifiable collections of records.- Returns:
- Unmodifiable collections of records
-
addPortListener
public void addPortListener(GridPortListener lsnr)
Add listener.- Parameters:
lsnr- Listener.
-
removePortListener
public void removePortListener(GridPortListener lsnr)
Remove listener.- Parameters:
lsnr- Listener.
-
printMemoryStats
public void printMemoryStats()
Prints memory statistics (sizes of internal structures, etc.). NOTE: this method is for testing and profiling purposes only.- Specified by:
printMemoryStatsin interfaceGridComponent- Overrides:
printMemoryStatsin classGridProcessorAdapter
-
-