Class ScheduledStatisticsHolder
java.lang.Object
org.openspaces.admin.internal.statistics.ScheduledStatisticsHolder
Holds the statics monitor future and lock mechanism.
Created by moran on 12/9/17.
- Since:
- 12.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelMonitor(boolean mayInterruptIfRunning) Should be called under lock.intShould be called under lock.intShould be called under lock.intlongbooleanShould be called under lock.voidupdateMonitor(ScheduledFuture<?> scheduledFuture) Should be called under lock.voidupdateStatisticsHistorySize(int statisticsHistorySize) Should be called under lock.voidupdateStatisticsInterval(long interval, TimeUnit timeUnit) Should be called under lock.
-
Constructor Details
-
ScheduledStatisticsHolder
public ScheduledStatisticsHolder()
-
-
Method Details
-
getStatisticsInterval
public long getStatisticsInterval()- Returns:
- the statistics interval (volatile access).
-
updateStatisticsInterval
Should be called under lock. Updates the interval. -
getStatisticsHistorySize
public int getStatisticsHistorySize()- Returns:
- the statistics history size (volatile access).
-
updateStatisticsHistorySize
public void updateStatisticsHistorySize(int statisticsHistorySize) Should be called under lock. Updates the history size. -
cancelMonitor
public void cancelMonitor(boolean mayInterruptIfRunning) Should be called under lock. Cancels the monitor -
updateMonitor
Should be called under lock. Updates the monitor -
getAndIncrementRefCount
public int getAndIncrementRefCount()Should be called under lock. Increments by 1 and returns the old value.- Returns:
- the value before increment.
-
decrementAndGetRefCount
public int decrementAndGetRefCount()Should be called under lock. Decrements by 1 and returns the new value.- Returns:
- the value after decrement or zero. Never negative.
-
isMonitoring
public boolean isMonitoring()Should be called under lock.- Returns:
- true if there is a scheduled monitor present.
-