Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side absolute closure to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side absolute closure to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side predicate to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side predicate to pimp.
Executes given closure within automatically managed grid instance.
Executes given closure within automatically managed grid instance.
Spring XML configuration file URL.
Closure to execute within automatically managed grid instance.
Executes given closure within automatically managed grid instance.
Executes given closure within automatically managed grid instance.
Grid configuration instance.
Closure to execute within automatically managed grid instance.
Executes given closure within automatically managed grid instance.
Executes given closure within automatically managed grid instance.
Spring XML configuration file path or URL.
Closure to execute within automatically managed grid instance.
Executes given closure within automatically managed default grid instance.
Executes given closure within automatically managed default grid instance. If default grid is already started the passed in closure will simply execute.
Closure to execute within automatically managed grid instance.
Executes given closure within automatically managed default grid instance.
Executes given closure within automatically managed default grid instance. If default grid is already started the passed in closure will simply execute.
Closure to execute within automatically managed default grid instance.
Executes given closure within automatically managed default grid instance.
Executes given closure within automatically managed default grid instance. If default grid is already started the passed in closure will simply execute.
Closure to execute within automatically managed default grid instance.
Executes given closure within automatically managed default grid instance.
Executes given closure within automatically managed default grid instance. If default grid is already started the passed in closure will simply execute.
Closure to execute within automatically managed default grid instance.
Gets named cache from specified grid.
Gets named cache from specified grid.
Name of the Ignite instance.
Name of the cache to get.
Gets named cache from default grid.
Gets named cache from default grid.
Name of the cache to get.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side closure to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side closure to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side closure to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side closure to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side closure to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side closure to pimp.
Creates cache with specified parameters in default grid.
Creates cache with specified parameters in default grid.
Name of the cache to get.
Sets daemon flag to grid factory.
Sets daemon flag to grid factory. Note that this method should be called before grid instance starts.
Daemon flag to set.
Gets a new instance of data streamer associated with given cache name.
Gets a new instance of data streamer associated with given cache name.
Cache name (null
for default cache).
Per node buffer size.
New instance of data streamer.
Destroy cache with specified name.
Destroy cache with specified name.
Name of the cache to destroy.
Implicit converter from GridAbsClosure
to Scala wrapping function.
Implicit converter from GridAbsClosure
to Scala wrapping function.
Grid closure to convert.
Implicit converter from GridAbsClosureX
to Scala wrapping function.
Implicit converter from GridAbsClosureX
to Scala wrapping function.
Grid closure to convert.
Implicit converter from GridAbsPredicate
to Scala wrapping predicate.
Implicit converter from GridAbsPredicate
to Scala wrapping predicate.
Grid predicate to convert.
Implicit converter from GridAbsPredicateX
to Scala wrapping predicate.
Implicit converter from GridAbsPredicateX
to Scala wrapping predicate.
Grid predicate to convert.
Implicit converter from GridClosure
to Scala wrapping closure.
Implicit converter from GridClosure
to Scala wrapping closure.
Grid closure to convert.
Implicit converter from GridClosure2X
to Scala wrapping closure.
Implicit converter from GridClosure2X
to Scala wrapping closure.
Grid closure to convert.
Implicit converter from GridClosure2X
to Scala wrapping closure.
Implicit converter from GridClosure2X
to Scala wrapping closure.
Grid closure to convert.
Implicit converter from GridClosure3
to Scala wrapping closure.
Implicit converter from GridClosure3
to Scala wrapping closure.
Grid closure to convert.
Implicit converter from GridClosure3X
to Scala wrapping closure.
Implicit converter from GridClosure3X
to Scala wrapping closure.
Grid closure to convert.
Implicit converter from GridClosureX
to Scala wrapping closure.
Implicit converter from GridClosureX
to Scala wrapping closure.
Grid closure to convert.
Implicit converter from GridInClosure
to Scala wrapping function.
Implicit converter from GridInClosure
to Scala wrapping function.
Grid closure to convert.
Implicit converter from GridInClosure2
to Scala wrapping function.
Implicit converter from GridInClosure2
to Scala wrapping function.
Grid closure to convert.
Implicit converter from GridInClosure2X
to Scala wrapping function.
Implicit converter from GridInClosure2X
to Scala wrapping function.
Grid closure to convert.
Implicit converter from GridInClosure3
to Scala wrapping function.
Implicit converter from GridInClosure3
to Scala wrapping function.
Grid closure to convert.
Implicit converter from GridInClosure3X
to Scala wrapping function.
Implicit converter from GridInClosure3X
to Scala wrapping function.
Grid closure to convert.
Implicit converter from GridInClosureX
to Scala wrapping function.
Implicit converter from GridInClosureX
to Scala wrapping function.
Grid closure to convert.
Implicit converter from GridOutClosure
to Scala wrapping function.
Implicit converter from GridOutClosure
to Scala wrapping function.
Grid closure to convert.
Implicit converter from GridOutClosureX
to Scala wrapping function.
Implicit converter from GridOutClosureX
to Scala wrapping function.
Grid closure to convert.
Implicit converter from GridPredicate
to Scala wrapping predicate.
Implicit converter from GridPredicate
to Scala wrapping predicate.
Grid predicate to convert.
Implicit converter from GridPredicate2X
to Scala wrapping predicate.
Implicit converter from GridPredicate2X
to Scala wrapping predicate.
Grid predicate to convert.
Implicit converter from GridPredicate2X
to Scala wrapping predicate.
Implicit converter from GridPredicate2X
to Scala wrapping predicate.
Grid predicate to convert.
Implicit converter from GridPredicate3X
to Scala wrapping predicate.
Implicit converter from GridPredicate3X
to Scala wrapping predicate.
Grid predicate to convert.
Implicit converter from GridPredicate3X
to Scala wrapping predicate.
Implicit converter from GridPredicate3X
to Scala wrapping predicate.
Grid predicate to convert.
Implicit converter from GridPredicate
to Scala wrapping predicate.
Implicit converter from GridPredicate
to Scala wrapping predicate.
Grid predicate to convert.
Implicit converter from Java GridReducer
to Scala function.
Implicit converter from Java GridReducer
to Scala function.
Java GridReducer
to convert.
Implicit converter from Java GridReducer2
to Scala function.
Implicit converter from Java GridReducer2
to Scala function.
Java GridReducer2
to convert.
Implicit converter from Java GridReducer3
to Scala function.
Implicit converter from Java GridReducer3
to Scala function.
Java GridReducer3
to convert.
Converts from Symbol
to String
.
Implicit converter from GridTuple2
to Scala tuple.
Implicit converter from GridTuple2
to Scala tuple.
GridTuple2
to convert.
Implicit converter from GridTuple3
to Scala tuple.
Implicit converter from GridTuple3
to Scala tuple.
GridTuple3
to convert.
Implicit converter from GridTuple4
to Scala tuple.
Implicit converter from GridTuple4
to Scala tuple.
GridTuple4
to convert.
Implicit converter from GridTuple5
to Scala tuple.
Implicit converter from GridTuple5
to Scala tuple.
GridTuple5
to convert.
Gets grid for given node ID.
Gets grid for given node ID.
Local node ID for which to get grid instance option.
Gets named Ignite instance.
Gets named Ignite instance.
Ignite instance name.
Gets default grid instance.
Gets default grid instance.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side closure to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side closure to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side closure to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side closure to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side closure to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side closure to pimp.
Gets daemon flag set in the grid factory.
Tests if default grid is started.
Tests if specified grid is started.
Tests if specified grid is started.
Gird name.
Tests if default grid is stopped.
Tests if specified grid is stopped.
Tests if specified grid is stopped.
Gird name.
Prints Scalar ASCII-logo.
Gets node ID as ID8 string.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side closure to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side closure to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side predicate to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side predicate to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side predicate to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side predicate to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side predicate to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side predicate to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side reducer to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side reducer to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side reducer to pimp.
Starts grid with given parameter(s).
Starts grid with given parameter(s).
Spring XML configuration file URL.
Started grid.
Starts grid with given parameter(s).
Starts grid with given parameter(s).
Grid configuration. This cannot be null
.
Started grid.
Starts grid with given parameter(s).
Starts grid with given parameter(s).
Spring XML configuration file path or URL.
Started grid. If Spring configuration contains multiple grid instances, then the 1st found instance is returned.
Starts default grid.
Starts default grid. It's no-op if default grid is already started.
Started grid.
Stops default grid with cancel flag set to true
.
Stops default grid with cancel flag set to true
.
If default grid is already stopped - it's no-op.
Stops default grid with given cancel flag.
Stops default grid with given cancel flag. If default grid is already stopped - it's no-op.
Whether or not to cancel all currently running jobs.
Stops given Ignite instance and specified cancel flag.
Stops given Ignite instance and specified cancel flag. If specified Ignite instance is already stopped - it's no-op.
Ignite instance name to cancel.
Whether or not to cancel all currently running jobs.
Explicit converter for TimerTask
.
Explicit converter for TimerTask
. Note that since TimerTask
implements Runnable
we can't use the implicit conversion.
Closure to convert.
Time task instance.
Implicit converter from java.lang.Runnable
to GridAbsClosure
.
Implicit converter from java.lang.Runnable
to GridAbsClosure
.
Java runnable to convert.
Implicit converter from Scala function to GridAbsClosureX
.
Implicit converter from Scala function to GridAbsClosureX
.
Scala function to convert.
Implicit converter from Scala predicate to GridAbsPredicate
.
Implicit converter from Scala predicate to GridAbsPredicate
.
Scala predicate to convert.
Implicit converter from Scala predicate to GridAbsPredicateX
.
Implicit converter from Scala predicate to GridAbsPredicateX
.
Scala predicate to convert.
Implicit converter from Scala function to GridOutClosure
.
Implicit converter from Scala function to GridOutClosure
.
Scala function to convert.
Implicit converter from Scala closure to GridClosure
.
Implicit converter from Scala closure to GridClosure
.
Scala closure to convert.
Implicit converter from Scala closure to GridClosure2
.
Implicit converter from Scala closure to GridClosure2
.
Scala closure to convert.
Implicit converter from Scala closure to GridClosure2X
.
Implicit converter from Scala closure to GridClosure2X
.
Scala closure to convert.
Implicit converter from Scala closure to GridClosure3X
.
Implicit converter from Scala closure to GridClosure3X
.
Scala closure to convert.
Implicit converter from Scala closure to GridClosure3X
.
Implicit converter from Scala closure to GridClosure3X
.
Scala closure to convert.
Implicit converter from Scala closure to GridClosureX
.
Implicit converter from Scala closure to GridClosureX
.
Scala closure to convert.
Implicit converter from Scala function to GridInClosure
.
Implicit converter from Scala function to GridInClosure
.
Scala function to convert.
Implicit converter from Scala function to GridInClosure2
.
Implicit converter from Scala function to GridInClosure2
.
Scala function to convert.
Implicit converter from Scala function to GridInClosure2X
.
Implicit converter from Scala function to GridInClosure2X
.
Scala function to convert.
Implicit converter from Scala function to GridInClosure3
.
Implicit converter from Scala function to GridInClosure3
.
Scala function to convert.
Implicit converter from Scala function to GridInClosure3X
.
Implicit converter from Scala function to GridInClosure3X
.
Scala function to convert.
Implicit converter from Scala function to GridInClosureX
.
Implicit converter from Scala function to GridInClosureX
.
Scala function to convert.
Helper transformer from Scala iterator to Java collection.
Helper transformer from Scala iterator to Java collection.
Scala iterator to transform.
Transforming function.
Helper converter from Scala sequence to Java collection.
Helper converter from Scala sequence to Java collection.
Scala sequence to convert.
Helper transformer from Scala sequence to Java collection.
Helper transformer from Scala sequence to Java collection.
Scala sequence to transform.
Transforming function.
Implicit converter from Scala function to ComputeJob
.
Implicit converter from Scala function to ComputeJob
.
Scala function to convert.
Implicit converter from Scala function to GridOutClosureX
.
Implicit converter from Scala function to GridOutClosureX
.
Scala function to convert.
Implicit converter from Scala predicate to Scala wrapping predicate.
Implicit converter from Scala predicate to Scala wrapping predicate.
Scala predicate to convert.
Implicit converter from Scala predicate to Scala wrapping predicate.
Implicit converter from Scala predicate to Scala wrapping predicate.
Scala predicate to convert.
Implicit converter from Scala predicate to Scala wrapping predicate.
Implicit converter from Scala predicate to Scala wrapping predicate.
Scala predicate to convert.
Implicit converter from Scala predicate to Scala wrapping predicate.
Implicit converter from Scala predicate to Scala wrapping predicate.
Scala predicate to convert.
Implicit converter from Scala predicate to Scala wrapping predicate.
Implicit converter from Scala predicate to Scala wrapping predicate.
Scala predicate to convert.
Implicit converter from Scala predicate to Scala wrapping predicate.
Implicit converter from Scala predicate to Scala wrapping predicate.
Scala predicate to convert.
Implicit converter from Scala function and Java GridReducer
.
Implicit converter from Scala function and Java GridReducer
.
Scala function to convert.
Implicit converter from Scala function and Java GridReducer2
.
Implicit converter from Scala function and Java GridReducer2
.
Scala function to convert.
Implicit converter from Scala function and Java GridReducer3
.
Implicit converter from Scala function and Java GridReducer3
.
Scala function to convert.
Introduction of ^^
operator for
Any type that will call
break.
Introduction of ^^
operator for
Any type that will call
break.
Any
value.
Implicit converter from Scala function to GridAbsClosure
.
Implicit converter from Scala function to GridAbsClosure
.
Scala function to convert.
Helper converter from Java entry collection to Scala iterable of pair.
Helper converter from Java entry collection to Scala iterable of pair.
Java collection to convert.
Helper converter from Java iterable to Scala sequence.
Helper converter from Java iterable to Scala sequence.
Java iterable to convert.
Helper transformer from Java iterable to Scala sequence.
Helper transformer from Java iterable to Scala sequence.
Java iterable to transform.
Transforming function.
Helper converter from Java iterator to Scala sequence.
Helper converter from Java iterator to Scala sequence.
Java iterator to convert.
Helper transformer from Java iterator to Scala sequence.
Helper transformer from Java iterator to Scala sequence.
Java iterator to transform.
Transforming function.
Helper transformer from Java collection to Scala sequence.
Helper transformer from Java collection to Scala sequence.
Java collection to transform.
Transforming function.
Implicit converter from Cache
to ScalarCachePimp
"pimp".
Implicit converter from Cache
to ScalarCachePimp
"pimp".
Grid cache to convert.
Implicit converter from Grid
to ScalarGridPimp
"pimp".
Implicit converter from Grid
to ScalarGridPimp
"pimp".
Grid to convert.
Implicit converter from GridProjection
to ScalarProjectionPimp
"pimp".
Implicit converter from GridProjection
to ScalarProjectionPimp
"pimp".
Grid projection to convert.
Implicit converter from Scala tuple to GridTuple2
.
Implicit converter from Scala tuple to GridTuple2
.
Scala tuple to convert.
Extension for Tuple2
.
Implicit converter from Scala tuple to GridTuple3
.
Implicit converter from Scala tuple to GridTuple3
.
Scala tuple to convert.
Extension for Tuple3
.
Implicit converter from Scala tuple to GridTuple4
.
Implicit converter from Scala tuple to GridTuple4
.
Scala tuple to convert.
Implicit converter from Scala tuple to GridTuple5
.
Implicit converter from Scala tuple to GridTuple5
.
Scala tuple to convert.
Implicit converter from vararg of one-argument Scala functions to Java GridPredicate
s.
Implicit converter from vararg of one-argument Scala functions to Java GridPredicate
s.
Sequence of one-argument Scala functions to convert.
Implicit converter from vararg of two-argument Scala functions to Java GridPredicate2
s.
Implicit converter from vararg of two-argument Scala functions to Java GridPredicate2
s.
Sequence of two-argument Scala functions to convert.
Implicit converter from vararg of three-argument Scala functions to Java GridPredicate3
s.
Implicit converter from vararg of three-argument Scala functions to Java GridPredicate3
s.
Sequence of three-argument Scala functions to convert.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side tuple to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side tuple to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side tuple to pimp.
Pimp for adding explicit conversion method scala
.
Pimp for adding explicit conversion method scala
.
Java-side tuple to pimp.
Overview
scalar
is the main object that encapsulates Scalar DSL. It includes global functions on "scalar" keyword, helper converters as well as necessary implicit conversions.scalar
also mimics many methods inIgnite
class from Java side.The idea behind Scalar DSL - zero additional logic and only conversions implemented using Scala "Pimp" pattern. Note that most of the Scalar DSL development happened on Java side of Ignite 3.0 product line - Java APIs had to be adjusted quite significantly to support natural adaptation of functional APIs. That basically means that all functional logic must be available on Java side and Scalar only provides conversions from Scala language constructs to Java constructs. Note that currently Ignite supports Scala 2.8 and up only.
This design approach ensures that Java side does not starve and usage paradigm is mostly the same between Java and Scala - yet with full power of Scala behind. In other words, Scalar only adds Scala specifics, but not greatly altering semantics of how Ignite APIs work. Most of the time the code in Scalar can be written in Java in almost the same number of lines.
Suffix '$' In Names
Symbol
$
is used in names when they conflict with the names in the base Java class that Scala pimp is shadowing or with Java package name that your Scala code is importing. Instead of giving two different names to the same function we've decided to simply mark Scala's side method with$
suffix.Importing
Scalar needs to be imported in a proper way so that necessary objects and implicit conversions got available in the scope:
This way you import objectscalar
as well as all methods declared or inherited in that object as well.Examples
Here are few short examples of how Scalar can be used to program routine distributed task. All examples below use default Ignite configuration and default grid. All these examples take an implicit advantage of auto-discovery and failover, load balancing and collision resolution, zero deployment and many other underlying technologies in the Ignite - while remaining absolutely distilled to the core domain logic.
This code snippet prints out full topology:
The obligatory example - cloud enabledHello World!
. It splits the phrase into multiple words and prints each word on a separate grid node: This example broadcasts message to all nodes: This example "greets" remote nodes only (note usage of Java-side closure):Next example creates a function that calculates lengths of the string using MapReduce type of processing by splitting the input string into multiple substrings, calculating each substring length on the remote node and aggregating results for the final length of the original string:
This example shows a simple example of how Scalar can be used to work with in-memory data grid: