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 null
public LockConfig(LockConfig config)
LockConfig
config
- the lock config to cloneNullPointerException
- if config is null
public 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 null
public LockConfig setName(String name)
name
- the name of the lockLockConfig
IllegalArgumentException
- 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()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.