Synchronization commands are used by the Synchronization service (described below) to manage application-level flags that let users know when processes are in use.
Command |
Description |
---|---|
set-flag --app app_id --flag flag |
Sets a flag that demonstrates that a group of processes are in use. You specify the flag with the application name and a flag name, which may be arbitrary but should be well-known. |
remove-flag --app app_id --flag flag |
Removes the named flag and releases the reserved processes. |
remove-all-flags --app app_id |
Removes all flags in an application and releases all reserved processes. |
list-flags --app app_id |
Lists all flags in an application. |
The Synchronization service lets you create, query, and delete application-level flags on a series of processes. These flags indicate that the flagged processes are in use. The service creates flags on the fly at the user’s request and deletes them when they are released. Using this service, multiple users can synchronize their activities by obtaining and querying the flags. If two users attempt to flag the same processes at the same time an error occurs.
Synchronization service flags are identified by an application name/flag name pair. Because flag names are user-created and arbitrary, all users must be aware of flag names and consistent in their use. If a set of processes needs to be reserved, then everyone concerned needs to know the name of the flag.
Example 24. Synchronization examples
The following example adds a flag called mkt1010 to the my_wine application:
eaccmd set-flag --app my_wine --flag mkt1010
The following example removes all flags in the my_wine application:
eaccmd remove-all-flags --app my_wine