public interface JetInstance
Modifier and Type | Method and Description |
---|---|
JetCacheManager |
getCacheManager()
Obtain the
JetCacheManager that provides access to JSR-107 (JCache) caches
configured on a Hazelcast Jet cluster. |
Cluster |
getCluster()
Returns information about the cluster this Jet instance is part of.
|
JetConfig |
getConfig()
Returns the configuration for this Jet member.
|
HazelcastInstance |
getHazelcastInstance()
Returns the underlying Hazelcast IMDG instance used by Jet.
|
Job |
getJob(long jobId)
Returns the job with the given id or
null if no such job could be found |
default Job |
getJob(String name)
Returns the last submitted job with the given name or
null
if no such job could be found. |
List<Job> |
getJobs()
Returns all submitted jobs including running and completed ones.
|
List<Job> |
getJobs(String name)
Returns all jobs submitted with the given name, ordered in descending order
by submission time.
|
<E> IListJet<E> |
getList(String name)
Returns the distributed list instance with the specified name.
|
<K,V> IMapJet<K,V> |
getMap(String name)
Returns the distributed map instance with the specified name.
|
String |
getName()
Returns the name of the Jet instance.
|
<K,V> ReplicatedMap<K,V> |
getReplicatedMap(String name)
Returns the replicated map instance with the specified name.
|
default Job |
newJob(DAG dag)
Creates and returns a Jet job based on the supplied DAG.
|
Job |
newJob(DAG dag,
JobConfig config)
Creates and returns a Jet job based on the supplied DAG and job
configuration.
|
default Job |
newJob(Pipeline pipeline)
Creates and returns an executable job based on the supplied pipeline.
|
default Job |
newJob(Pipeline pipeline,
JobConfig config)
Creates and returns a Jet job based on the supplied pipeline and job
configuration.
|
void |
shutdown()
Shuts down the current instance.
|
@Nonnull HazelcastInstance getHazelcastInstance()
JetInstance
.@Nonnull Cluster getCluster()
@Nonnull JetConfig getConfig()
@Nonnull default Job newJob(@Nonnull DAG dag)
@Nonnull Job newJob(@Nonnull DAG dag, @Nonnull JobConfig config)
If the name in the JobConfig is null, it will set the generated jobId as a name. If the name looks like a previously assigned jobId, it will be replaced as well.
@Nonnull default Job newJob(@Nonnull Pipeline pipeline)
@Nonnull default Job newJob(@Nonnull Pipeline pipeline, @Nonnull JobConfig config)
If the name in the JobConfig is null, it will set the generated jobId as a name. If the name looks like a previously assigned jobId, it will be replaced as well.
@Nonnull List<Job> getJobs()
@Nullable Job getJob(long jobId)
null
if no such job could be found@Nonnull List<Job> getJobs(@Nonnull String name)
@Nullable default Job getJob(@Nonnull String name)
null
if no such job could be found.@Nonnull <K,V> IMapJet<K,V> getMap(@Nonnull String name)
name
- name of the distributed map@Nonnull <K,V> ReplicatedMap<K,V> getReplicatedMap(@Nonnull String name)
GeneralStage.mapUsingReplicatedMap(String, DistributedBiFunction)
name
- name of the distributed map@Nonnull <E> IListJet<E> getList(@Nonnull String name)
name
- name of the distributed list@Nonnull JetCacheManager getCacheManager()
JetCacheManager
that provides access to JSR-107 (JCache) caches
configured on a Hazelcast Jet cluster.
Note that this method does not return a JCache CacheManager
JetCacheManager
JetCacheManager
void shutdown()
The call blocks until the instance is actually down.
Note: If you call this.getHazelcastInstance().shutdown()
,
it will cause all the jobs that run on this member to be forcefully
terminated, without creating a terminal snapshot. After the cluster
stabilizes again, Jet will restart them from the last snapshot that was
created some time ago.
Copyright © 2018 Hazelcast, Inc.. All rights reserved.