Class GridRestProcessor
- java.lang.Object
-
- org.apache.ignite.internal.processors.GridProcessorAdapter
-
- org.apache.ignite.internal.processors.rest.GridRestProcessor
-
- All Implemented Interfaces:
GridComponent,GridProcessor,IgniteRestProcessor
public class GridRestProcessor extends GridProcessorAdapter implements IgniteRestProcessor
Rest processor implementation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.ignite.internal.GridComponent
GridComponent.DiscoveryDataExchangeType
-
-
Field Summary
Fields Modifier and Type Field Description static intDFLT_SES_TIMEOUTDefault session timeout, in seconds.static intDFLT_SES_TOKEN_INVALIDATE_INTERVALThe default interval used to invalidate sessions, in seconds.protected Map<GridRestCommand,GridRestCommandHandler>handlersCommand handlers.-
Fields inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter
ctx, diagnosticLog, log
-
-
Constructor Summary
Constructors Constructor Description GridRestProcessor(GridKernalContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IgniteInternalFuture<GridRestResponse>handleAsync0(GridRestRequest req)voidonKernalStart(boolean active)Callback that notifies that kernal has successfully started, including all managers and processors.voidonKernalStop(boolean cancel)Callback to notify that kernal is about to stop.voidprintMemoryStats()Prints memory statistics (sizes of internal structures, etc.).voidstart()Starts grid component.-
Methods inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter
assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onReconnected, stop, toString, validateNode, validateNode
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.internal.GridComponent
collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onReconnected, stop, validateNode, validateNode
-
-
-
-
Field Detail
-
DFLT_SES_TIMEOUT
public static final int DFLT_SES_TIMEOUT
Default session timeout, in seconds.- See Also:
- Constant Field Values
-
DFLT_SES_TOKEN_INVALIDATE_INTERVAL
public static final int DFLT_SES_TOKEN_INVALIDATE_INTERVAL
The default interval used to invalidate sessions, in seconds.- See Also:
- Constant Field Values
-
handlers
protected final Map<GridRestCommand,GridRestCommandHandler> handlers
Command handlers.
-
-
Constructor Detail
-
GridRestProcessor
public GridRestProcessor(GridKernalContext ctx)
- Parameters:
ctx- Context.
-
-
Method Detail
-
handleAsync0
protected IgniteInternalFuture<GridRestResponse> handleAsync0(GridRestRequest req)
- Parameters:
req- Request.- Returns:
- Future.
This method made
protectedintentionally so any plugin provided implementation can extend it to enhance request handling.
-
start
public void start() throws IgniteCheckedExceptionStarts grid component.- Specified by:
startin interfaceGridComponent- Overrides:
startin classGridProcessorAdapter- Throws:
IgniteCheckedException- Throws in case of any errors.
-
onKernalStart
public void onKernalStart(boolean active) throws IgniteCheckedExceptionCallback that notifies that kernal has successfully started, including all managers and processors.- Specified by:
onKernalStartin interfaceGridComponent- Overrides:
onKernalStartin classGridProcessorAdapter- Parameters:
active- Cluster active flag (note: should be used carefully since state can change concurrently).- Throws:
IgniteCheckedException- Thrown in case of any errors.
-
onKernalStop
public void onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.- Specified by:
onKernalStopin interfaceGridComponent- Overrides:
onKernalStopin classGridProcessorAdapter- Parameters:
cancel- Flag indicating whether jobs should be canceled.
-
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
-
-