public class SharedParamManager extends Object
Constructor and Description |
---|
SharedParamManager() |
Modifier and Type | Method and Description |
---|---|
static long |
addAndGetDistributedCounter(String id,
long value)
Add given value to the distribute counter of caller context of given id.
|
static long |
asyncGetAndAddDistributedCounter(String id,
long value)
Asynchronously add given value to the distribute counter of caller context of given id.
|
static long |
asyncGetAndAlterDistributedCounter(String id,
long value)
Asynchronously add given value to the distribute counter of caller context of given id.
|
static long |
getDistributedCounter(String id)
Return hazelcast shared counter for this caller context with given id.
|
static long |
getSharedTimestamp(String id)
Return hazelcast shared timestamp for this caller context with given id.
|
static long |
getSharedTimestampWithFullId(String id)
Return hazelcast shared timestamp for this caller context with given full id.
|
static void |
removeCounter(String id)
Destroy hazelcast global counter, if it's local then remove the map entry
|
static void |
removeTimestamp(String id)
Destroy hazelcast shared timggestamp counter, if it's local then remove the map entry
|
static void |
removeTimestampWithFullId(String id)
Destroy hazelcast shared timggestamp counter with full id, if it's local then remove the map entry
|
static void |
setDistributedCounter(String id,
long value)
Set distribute counter of caller context of given id to the provided value.
|
static void |
setSharedTimestamp(String id,
long timestamp)
Set distribute timestamp of caller context of given id to the provided value.
|
public static long getDistributedCounter(String id)
id
- of the shared counterpublic static void setDistributedCounter(String id, long value)
id
- of the caller contextvalue
- to set to the global counterpublic static long addAndGetDistributedCounter(String id, long value)
id
- of the caller contextvalue
- to set to the global counterpublic static long asyncGetAndAddDistributedCounter(String id, long value)
id
- of the caller contextvalue
- to set to the global counterpublic static long asyncGetAndAlterDistributedCounter(String id, long value)
id
- of the caller contextvalue
- to set to the global counterpublic static void removeCounter(String id)
id
- of the caller contextpublic static long getSharedTimestamp(String id)
id
- of the shared counterpublic static long getSharedTimestampWithFullId(String id)
id
- of the shared counterpublic static void setSharedTimestamp(String id, long timestamp)
id
- of the caller contexttimestamp
- to set to the global counterpublic static void removeTimestamp(String id)
id
- of the caller contextpublic static void removeTimestampWithFullId(String id)
id
- of the caller contextCopyright © 2005–2019 Apache Software Foundation. All rights reserved.