Java Code Examples for org.agrona.concurrent.status.AtomicCounter#set()

The following examples show how to use org.agrona.concurrent.status.AtomicCounter#set() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClusterControl.java    From aeron with Apache License 2.0 2 votes vote down vote up
/**
 * Reset the toggle to the {@link #NEUTRAL} state.
 *
 * @param controlToggle to be reset.
 */
public static void reset(final AtomicCounter controlToggle)
{
    controlToggle.set(NEUTRAL.code());
}
 
Example 2
Source File: ClusterControl.java    From aeron with Apache License 2.0 2 votes vote down vote up
/**
 * Activate the toggle by setting it to the {@link #NEUTRAL} state.
 *
 * @param controlToggle to be activated.
 */
public static void activate(final AtomicCounter controlToggle)
{
    controlToggle.set(NEUTRAL.code());
}
 
Example 3
Source File: ClusterControl.java    From aeron with Apache License 2.0 2 votes vote down vote up
/**
 * Activate the toggle by setting it to the {@link #INACTIVE} state.
 *
 * @param controlToggle to be deactivated.
 */
public static void deactivate(final AtomicCounter controlToggle)
{
    controlToggle.set(INACTIVE.code());
}