public enum LockProvider extends Enum<LockProvider>
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanupCache() |
boolean |
init()
Just to initialize instance not while the 1st inbound message processing,
but near the activation of the 1st trigger.
|
void |
notify(String key)
|
static LockProvider |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LockProvider[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
void |
wait(String sessionId)
Method will create an object in
Cache and call Object.wait() method
for this object to stop the current thread. |
Message |
waitResponse(String sessionId,
int interval)
Wait for a response message.
|
Message |
waitResponse(String sessionId,
int interval,
int maxInterval,
float multiplier)
Wait for a response message, fixed or exponential waits in the loop.
|
public static final LockProvider INSTANCE
public static LockProvider[] values()
for (LockProvider c : LockProvider.values()) System.out.println(c);
public static LockProvider valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic void notify(@Nonnull String key)
WeakValue from cache by the key
if value is present, method will call Cache.invalidate(Object)
in the cache I've added the remove listener, which call notify for WeakValue object on Remove event.key - - session key.public void wait(@Nonnull String sessionId) throws InterruptedException
Cache and call Object.wait() method
for this object to stop the current thread.
Until some object call notify(String)sessionId - - transport session idInterruptedException - - exceptionpublic Message waitResponse(@Nonnull String sessionId, int interval) throws InterruptedException
sessionId - - Session Uuid to wait a response,interval - - interval to wait, in milliseconds,InterruptedException - - in case wait is interrupted.public Message waitResponse(@Nonnull String sessionId, int interval, int maxInterval, float multiplier) throws InterruptedException
sessionId - - Session Uuid to wait a response,interval - - interval to wait inside loop, in milliseconds,maxInterval - - max interval to wait, in milliseconds,multiplier - - multiplier for exponential waits,InterruptedException - - in case wait is interrupted.public boolean init()
public void cleanupCache()
Copyright © 2025. All rights reserved.