org.apache.ignite.internal.worker

## Class WorkersRegistry

- java.lang.Object
- - org.apache.ignite.internal.worker.WorkersRegistry

All Implemented Interfaces:
  EventListener, GridWorkerListener

    public class WorkersRegistry
    extends Object
    implements GridWorkerListener

Workers registry.

### Constructor Summary

Constructors
Constructor and Description
`WorkersRegistry()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Collection<String>` `names()` Returns names of all registered workers.
`void` `onStarted(GridWorker w)`
`void` `onStopped(GridWorker w)`
`void` `register(GridWorker w)` Adds worker to the registry.
`void` `unregister(String name)` Removes worker from the registry.
`GridWorker` `worker(String name)` Returns worker with given name.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### WorkersRegistry

    public WorkersRegistry()

### Method Detail

#### register

    public void register(GridWorker w)

Adds worker to the registry.

Parameters:
  `w` - Worker.

#### unregister

    public void unregister(String name)

Removes worker from the registry.

Parameters:
  `name` - Worker name.

#### names

    public Collection<String> names()

Returns names of all registered workers.

Returns:
  Registered worker names.

#### worker

    public GridWorker worker(String name)

Returns worker with given name.

Parameters:
  `name` - Name.
Returns:
  Registered `GridWorker` with name `name` or `null` if not found.

#### onStarted

    public void onStarted(GridWorker w)

Specified by:
  `onStarted` in interface `GridWorkerListener`
Parameters:
  `w` - Started worker.

#### onStopped

    public void onStopped(GridWorker w)

Specified by:
  `onStopped` in interface `GridWorkerListener`
Parameters:
  `w` - Stopped worker.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.5.0
Release Date | : May 23 2018