public final class DataStructuresProcessor extends GridProcessorAdapter implements IgniteChangeGlobalStateSupport
GridComponent.DiscoveryDataExchangeType| Modifier and Type | Field and Description |
|---|---|
static String |
ATOMICS_CACHE_NAME
Atomics system cache name.
|
ctx, diagnosticLog, log| Constructor and Description |
|---|
DataStructuresProcessor(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
IgniteAtomicLong |
atomicLong(String name,
AtomicConfiguration cfg,
long initVal,
boolean create)
Gets an atomic long from cache or creates one if it's not cached.
|
<T> IgniteAtomicReference<T> |
atomicReference(String name,
AtomicConfiguration cfg,
T initVal,
boolean create)
Gets an atomic reference from cache or creates one if it's not cached.
|
<T,S> IgniteAtomicStamped<T,S> |
atomicStamped(String name,
AtomicConfiguration cfg,
T initVal,
S initStamp,
boolean create)
Gets an atomic stamped from cache or creates one if it's not cached.
|
IgniteCountDownLatch |
countDownLatch(String name,
AtomicConfiguration cfg,
int cnt,
boolean autoDel,
boolean create)
Gets or creates count down latch.
|
static boolean |
isDataStructureCache(String cacheName) |
static boolean |
isReservedGroup(String grpName) |
void |
onActivate(GridKernalContext ctx)
Called when cluster performing activation.
|
void |
onDeActivate(GridKernalContext ctx)
Called when cluster performing deactivation.
|
void |
onKernalStart(boolean active)
Callback that notifies that kernal has successfully started,
including all managers and processors.
|
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
IgniteInternalFuture<?> |
onReconnected(boolean clusterRestarted)
Client reconnected callback.
|
void |
printMemoryStats()
Prints memory statistics (sizes of internal structures, etc.).
|
<T> IgniteQueue<T> |
queue(String name,
String grpName,
int cap,
CollectionConfiguration cfg)
Gets a queue from cache or creates one if it's not cached.
|
IgniteLock |
reentrantLock(String name,
AtomicConfiguration cfg,
boolean failoverSafe,
boolean fair,
boolean create)
Gets or creates reentrant lock.
|
void |
removeCountDownLatch(String name,
String grpName)
Removes count down latch from cache.
|
void |
removeQueue(String name,
GridCacheContext cctx) |
void |
removeReentrantLock(String name,
String grpName,
boolean broken)
Removes reentrant lock from cache.
|
void |
removeSemaphore(String name,
String grpName)
Removes semaphore from cache.
|
void |
removeSet(String name,
GridCacheContext cctx) |
void |
restoreStructuresState(GridKernalContext ctx) |
static <R> R |
retry(IgniteLogger log,
Callable<R> call) |
IgniteSemaphore |
semaphore(String name,
AtomicConfiguration cfg,
int cnt,
boolean failoverSafe,
boolean create)
Gets or creates semaphore.
|
IgniteAtomicSequence |
sequence(String name,
AtomicConfiguration cfg,
long initVal,
boolean create)
Gets a sequence from cache or creates one if it's not cached.
|
<T> IgniteSet<T> |
set(String name,
String grpName,
CollectionConfiguration cfg)
Gets a set from cache or creates one if it's not cached.
|
void |
start()
Starts grid component.
|
assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, stop, toString, validateNodepublic static final String ATOMICS_CACHE_NAME
public DataStructuresProcessor(GridKernalContext ctx)
ctx - Context.public void start()
throws IgniteCheckedException
start in interface GridComponentstart in class GridProcessorAdapterIgniteCheckedException - Throws in case of any errors.public void onKernalStart(boolean active)
throws IgniteCheckedException
onKernalStart in interface GridComponentonKernalStart in class GridProcessorAdapteractive - Cluster active flag (note: should be used carefully since state can
change concurrently).IgniteCheckedException - Thrown in case of any errors.public void onKernalStop(boolean cancel)
onKernalStop in interface GridComponentonKernalStop in class GridProcessorAdaptercancel - Flag indicating whether jobs should be canceled.public void onActivate(GridKernalContext ctx) throws IgniteCheckedException
onActivate in interface IgniteChangeGlobalStateSupportctx - Kernal context.IgniteCheckedException - If failed.public void restoreStructuresState(GridKernalContext ctx)
ctx - Context.public void onDeActivate(GridKernalContext ctx)
onDeActivate in interface IgniteChangeGlobalStateSupportctx - Kernal context.public IgniteInternalFuture<?> onReconnected(boolean clusterRestarted) throws IgniteCheckedException
onReconnected in interface GridComponentonReconnected in class GridProcessorAdapterclusterRestarted - Cluster restarted flag.IgniteCheckedException - If failed.public static boolean isDataStructureCache(String cacheName)
cacheName - Cache name.True if cache with such name is used to store data structures.public static boolean isReservedGroup(@Nullable
String grpName)
grpName - Group name.True if group name is reserved to store data structures.public final IgniteAtomicSequence sequence(String name, @Nullable AtomicConfiguration cfg, long initVal, boolean create) throws IgniteCheckedException
name - Sequence name.cfg - Configuration.initVal - Initial value for sequence. If sequence already cached, initVal will be ignored.create - If true sequence will be created in case it is not in cache.IgniteCheckedException - If loading failed.public final IgniteAtomicLong atomicLong(String name, @Nullable AtomicConfiguration cfg, long initVal, boolean create) throws IgniteCheckedException
name - Name of atomic long.cfg - Configuration.initVal - Initial value for atomic long. If atomic long already cached, initVal
will be ignored.create - If true atomic long will be created in case it is not in cache.IgniteCheckedException - If loading failed.public final <T> IgniteAtomicReference<T> atomicReference(String name, @Nullable AtomicConfiguration cfg, T initVal, boolean create) throws IgniteCheckedException
name - Name of atomic reference.cfg - Configuration.initVal - Initial value for atomic reference. If atomic reference already cached, initVal
will be ignored.create - If true atomic reference will be created in case it is not in cache.IgniteCheckedException - If loading failed.public final <T,S> IgniteAtomicStamped<T,S> atomicStamped(String name, @Nullable AtomicConfiguration cfg, T initVal, S initStamp, boolean create) throws IgniteCheckedException
name - Name of atomic stamped.cfg - Configuration.initVal - Initial value for atomic stamped. If atomic stamped already cached, initVal
will be ignored.initStamp - Initial stamp for atomic stamped. If atomic stamped already cached, initStamp
will be ignored.create - If true atomic stamped will be created in case it is not in cache.IgniteCheckedException - If loading failed.public final <T> IgniteQueue<T> queue(String name, @Nullable String grpName, int cap, @Nullable CollectionConfiguration cfg) throws IgniteCheckedException
name - Name of queue.grpName - Group name. If present, will override groupName from configuration.cap - Max size of queue.cfg - Non-null queue configuration if new queue should be created.IgniteCheckedException - If failed.public void removeQueue(String name, GridCacheContext cctx) throws IgniteCheckedException
name - Queue name.cctx - Queue cache context.IgniteCheckedException - If failed.public IgniteCountDownLatch countDownLatch(String name, @Nullable AtomicConfiguration cfg, int cnt, boolean autoDel, boolean create) throws IgniteCheckedException
name - Name of the latch.cfg - Configuration.cnt - Initial count.autoDel - True to automatically delete latch from cache when
its count reaches zero.create - If true latch will be created in case it is not in cache,
if it is false all parameters except name are ignored.null if it is not found and
create is false.IgniteCheckedException - If operation failed.public void removeCountDownLatch(String name, String grpName) throws IgniteCheckedException
name - Name of the latch.grpName - Cache group name.IgniteCheckedException - If operation failed.public IgniteSemaphore semaphore(String name, @Nullable AtomicConfiguration cfg, int cnt, boolean failoverSafe, boolean create) throws IgniteCheckedException
name - Name of the semaphore.cfg - Configuration.cnt - Initial count.failoverSafe - True FailoverSafe parameter.create - If true semaphore will be created in case it is not in cache,
if it is false all parameters except name are ignored.null if it is not found and
create is false.IgniteCheckedException - If operation failed.public void removeSemaphore(String name, String grpName) throws IgniteCheckedException
name - Name of the semaphore.grpName - Group name.IgniteCheckedException - If operation failed.public IgniteLock reentrantLock(String name, @Nullable AtomicConfiguration cfg, boolean failoverSafe, boolean fair, boolean create) throws IgniteCheckedException
name - Name of the reentrant lock.cfg - Configuration.failoverSafe - Flag indicating behaviour in case of failure.fair - Flag indicating fairness policy of this lock.create - If true reentrant lock will be created in case it is not in cache.null if it is not found and
create is false.IgniteCheckedException - If operation failed.public void removeReentrantLock(String name, String grpName, boolean broken) throws IgniteCheckedException
name - Name of the reentrant lock.grpName - Group name.broken - Flag indicating the reentrant lock is broken and should be removed unconditionally.IgniteCheckedException - If operation failed.@Nullable public <T> IgniteSet<T> set(String name, @Nullable String grpName, @Nullable CollectionConfiguration cfg) throws IgniteCheckedException
name - Set name.grpName - Group name. If present, will override groupName from configuration.cfg - Set configuration if new set should be created.IgniteCheckedException - If failed.public void removeSet(String name, GridCacheContext cctx) throws IgniteCheckedException
name - Set name.cctx - Set cache context.IgniteCheckedException - If failed.public static <R> R retry(IgniteLogger log, Callable<R> call) throws IgniteCheckedException
log - Logger.call - Callable.IgniteCheckedException - If all retries failed.public void printMemoryStats()
printMemoryStats in interface GridComponentprintMemoryStats in class GridProcessorAdapter
Follow @ApacheIgnite
Ignite Fabric : ver. 2.1.0 Release Date : July 20 2017