public class LockConfig extends Object implements IdentifiedDataSerializable
ILock.| Constructor and Description |
|---|
LockConfig() |
LockConfig(LockConfig config)
Clones a
LockConfig |
LockConfig(String name)
Creates a
LockConfig with the provided name. |
LockConfig(String name,
LockConfig config)
Creates a new
LockConfig by cloning an existing config and overriding the name. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
LockConfig |
getAsReadOnly()
Deprecated.
this method will be removed in 4.0; it is meant for internal usage only
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
String |
getName()
Returns the name of the lock.
|
String |
getQuorumName()
Returns the quorum name for lock operations.
|
int |
hashCode() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
LockConfig |
setName(String name)
Sets the name of the lock.
|
LockConfig |
setQuorumName(String quorumName)
Sets the quorum name for lock operations.
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public LockConfig()
public LockConfig(String name)
LockConfig with the provided name.name - the nameNullPointerException - if name is nullpublic LockConfig(LockConfig config)
LockConfigconfig - the lock config to cloneNullPointerException - if config is nullpublic LockConfig(String name, LockConfig config)
LockConfig by cloning an existing config and overriding the name.name - the new nameconfig - the configNullPointerException - if name or config is nullpublic LockConfig setName(String name)
name - the name of the lockLockConfigIllegalArgumentException - if name is null or an empty stringpublic String getName()
public String getQuorumName()
public LockConfig setQuorumName(String quorumName)
quorumName - the quorum namepublic LockConfig getAsReadOnly()
public int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getId()
IdentifiedDataSerializablegetId in interface IdentifiedDataSerializablepublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - outputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializablereadData in interface DataSerializablein - inputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
input stream has been closed.Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.