This set of Java Spring Multiple Choice Questions & Answers (MCQs) focuses on “Parallelizing Processing and Load Balancing”.
1. To quickly grid-enable a method on a bean using GridGain.
a) @Gridify
b) @Grid
c) @GridGain
d) None of the mentioned
View Answer
Explanation: You can use GridGain @Gridify annotation along with some Spring AOP configuration to let GridGain know that it can parallelize the execution of the method across the grid.
2. GridGain provides:-
a) load balancing
b) fault tolerance
c) routing
d) all of the mentioned
View Answer
Explanation: GridGain provides load balancing as well as fault tolerance and routing out of the box, which you get for free by adding this annotation.
3. To build a parallelized solution for a problem that’s intrinsically better-suited to parallelization or that, for want of resources, needs to be chunked.
a) map
b) reduce
c) all of the mentioned
d) none of the mentioned
View Answer
Explanation: Use map/reduce to approach the problem concurrently.
4. GridGain works with a GridTask 5. When you call the method on the service with the @Gridify annotation pointing to this GridTask implementation, it stops execution of method and loads an instance of this implementation. 6. When using GridGain stem mostly from the fact that what you develop on one node can’t always automatically work on another node with no additional configuration. 7. GridGain lets you start up nodes using the startup script in the:- 8. To hoist a grid node into existence. 9. When you use the script that comes with the distribution is the class:-
a) Grid
b) GridGain
c) GridJob
d) All of the mentioned
View Answer
Explanation: Underneath the hood, GridGain works with a GridTask
a) True
b) False
View Answer
Explanation: The parameters, as passed to the method with the annotation, are passed to: split(int i, final GridifyArgument gridifyArgument), which is used to dole out GridJob instances.
a) True
b) False
View Answer
Explanation: The parameters, as passed to the method with the annotation, are passed to: split(int i, final GridifyArgument gridifyArgument), which is used to dole out GridJob instances.
a) etc
b) opt
c) bin
d) all of the mentioned
View Answer
Explanation: GridGain lets you start up nodes using the startup script in the bin directory of the distribution.
a) GridLoader
b) GridLoad
c) Grid
d) GridGain
View Answer
Explanation: The GridLoader’s job is to hoist a grid node into existence.
a) GridCommandLine
b) GridCommandLineLoader
c) GridCommand
d) All of the mentioned
View Answer
Explanation: The one that gets started when you use the script that comes with the distribution is the class GridCommandLineLoader.
10. A GridLoader instance is responsible for many things such as:-
a) GridFactory.start
b) GridFactory.stop
c) All of the mentioned
d) None of the mentioned
View Answer
Explanation: A GridLoader instance is responsible for many things, not the least of which is correctly calling GridFactory.start and GridFactory.stop.
11. GridFactory.start can take as its first parameter a:-
a) GridConfiguration object
b) Spring application context
c) All of the mentioned
d) None of the mentioned
View Answer
Explanation: This GridConfiguration object is what tells GridGain what is unique about a given node and the grid’s topology. By default, it uses $GRIDGAIN HOME/config/default-spring.xml, which, in turn, does things such as load a Grid object and configure user parameters about a specific node.
12. The file which enables you to tell GridGain about which GridTask
a) gridgain.xml
b) gridgain.html
c) grid.xml
d) gridify.xml
View Answer
Explanation: gridgain.xml file, which is optional, enables you to tell GridGain about which GridTask
13. Instances of the ApplicationContext can be injected into the various GridGain class instances (GridTask
a) @Grid
b) @GridGain
c) @Gridify
d) None of the mentioned
View Answer
Explanation: Instances of the ApplicationContext can be injected into the various GridGain class instances (GridTask
14. This is the default implementation. It is used when you run gridgain.sh or gridgain.bat.
a) org.gridgain.grid.loaders.cmdline.GridCommandLineLoader
b) org.gridgain.grid.loaders.servlet.GridServletLoader
c) org.gridgain.grid.loaders.jboss.GridJbossLoader
d) org.gridgain.grid.loaders.weblogic.GridWeblogicStartup
View Answer
Explanation: org.gridgain.grid.loaders.cmdline.GridCommandLineLoader This is the default implementation. It is used when you run gridgain.sh or gridgain.bat.
15. This is likely the second most useful implementation. It provides a servlet that bootstraps the GridGain instance inside any web container as a servlet.
a) org.gridgain.grid.loaders.cmdline.GridCommandLineLoader
b) org.gridgain.grid.loaders.servlet.GridServletLoader
c) org.gridgain.grid.loaders.jboss.GridJbossLoader
d) org.gridgain.grid.loaders.weblogic.GridWeblogicStartup
View Answer
Explanation: org.gridgain.grid.loaders.servlet.GridServletLoader This is likely the second most useful implementation. It provides a servlet that bootstraps the GridGain instance inside any web container as a servlet.
Sanfoundry Global Education & Learning Series – Java Spring.
To practice all areas of Java Spring, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Get Free Certificate of Merit in Spring
- Participate in Spring Certification Contest
- Become a Top Ranker in Spring
- Take Spring Tests
- Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Practice Programming MCQs
- Apply for Programming Internship
- Apply for Spring Internship
- Buy Information Technology Books
- Buy Spring Books