public class LockConfig extends Object implements IdentifiedDataSerializable, NamedConfig
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)
setName
in interface NamedConfig
name
- the name of the lockLockConfig
IllegalArgumentException
- if name is null
or an empty stringpublic String getName()
getName
in interface NamedConfig
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
- 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
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.