| java.lang.Object com.tc.object.config.ConfigLockLevel
ConfigLockLevel | public class ConfigLockLevel (Code) | | Describe a lock level from a set of enumerated values. Use the static constants or
the static factory method
ConfigLockLevel.lockLevelByName(String) to get an instance. There are
8 types of locks defined in the config - these can all be applied to auto locks, but
only the ones without AUTO_SYNCHRONIZED prefix can be used with named locks.
From a concurrency perspective, there are four levels of locking that allow different
amounts of access to a section:
- WRITE - like Java synchronized sections - only one thread in the cluster may enter
- READ - allow either one writer or multiple readers at any given time
- CONCURRENT - perform no locking, but serve to mark memory transaction boundaries
- SYNCHRONOUS_WRITE - like WRITE but do not commit until the data has been saved to disk
In addition, for autolocks, there is an extra attribute called "auto-synhcronized" that indicates
that the method should be made synchronized before auto-locking. This is useful in code you don't have
control over that needs to be be made synchronized for use in a clustered environment.
|
AUTO_SYNCHRONIZED_CONCURRENT | final public static ConfigLockLevel AUTO_SYNCHRONIZED_CONCURRENT(Code) | | CONCURRENT lock, auto-synchronize=false
|
AUTO_SYNCHRONIZED_CONCURRENT_NAME | final static String AUTO_SYNCHRONIZED_CONCURRENT_NAME(Code) | | |
AUTO_SYNCHRONIZED_READ | final public static ConfigLockLevel AUTO_SYNCHRONIZED_READ(Code) | | READ lock, auto-synchronize=false
|
AUTO_SYNCHRONIZED_READ_NAME | final static String AUTO_SYNCHRONIZED_READ_NAME(Code) | | |
AUTO_SYNCHRONIZED_SYNCHRONOUS_WRITE | final public static ConfigLockLevel AUTO_SYNCHRONIZED_SYNCHRONOUS_WRITE(Code) | | SYNCHRONOUS_WRITE lock, auto-synchronize=false
|
AUTO_SYNCHRONIZED_SYNCHRONOUS_WRITE_NAME | final static String AUTO_SYNCHRONIZED_SYNCHRONOUS_WRITE_NAME(Code) | | |
AUTO_SYNCHRONIZED_WRITE | final public static ConfigLockLevel AUTO_SYNCHRONIZED_WRITE(Code) | | WRITE lock, auto-synchronize=true
|
AUTO_SYNCHRONIZED_WRITE_NAME | final static String AUTO_SYNCHRONIZED_WRITE_NAME(Code) | | |
SYNCHRONOUS_WRITE | final public static ConfigLockLevel SYNCHRONOUS_WRITE(Code) | | SYNCHRONOUS_WRITE lock, auto-synchronize=false
|
SYNCHRONOUS_WRITE_NAME | final static String SYNCHRONOUS_WRITE_NAME(Code) | | |
getLevel | public int getLevel()(Code) | | Ordinal lock level value |
lockLevelByName | public static ConfigLockLevel lockLevelByName(String typeName)(Code) | | Provide an instance of the constant for the specified name
or null if name is invalid
Parameters: typeName - Lock level name Lock level instance |
|
|