Package com.hazelcast.config
Class PermissionConfig
java.lang.Object
com.hazelcast.config.PermissionConfig
- All Implemented Interfaces:
DataSerializable
,IdentifiedDataSerializable
,com.hazelcast.nio.serialization.impl.Versioned
public class PermissionConfig
extends Object
implements IdentifiedDataSerializable, com.hazelcast.nio.serialization.impl.Versioned
Contains the configuration for a permission.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionPermissionConfig
(PermissionConfig permissionConfig) PermissionConfig
(PermissionConfig.PermissionType type, String name, String principal) -
Method Summary
Modifier and TypeMethodDescriptionaddEndpoint
(String endpoint) boolean
int
Returns type identifier for this class.int
Returns DataSerializableFactory factory ID for this class.getName()
getType()
int
hashCode()
boolean
isDeny()
Returnstrue
when the permission should be subtracted (denied) instead of added (granted).void
Reads fields from the input streamsetActions
(Set<String> actions) setDeny
(boolean deny) Configures if this permission config is for a grant (false
, default) permission or deny (true
)setEndpoints
(Set<String> endpoints) setPrincipal
(String principal) toString()
void
Writes object fields to output stream
-
Constructor Details
-
PermissionConfig
public PermissionConfig() -
PermissionConfig
-
PermissionConfig
-
-
Method Details
-
addEndpoint
-
addAction
-
getType
-
getName
-
getPrincipal
-
getEndpoints
-
getActions
-
setType
-
setName
-
setPrincipal
-
setActions
-
setEndpoints
-
getFactoryId
public int getFactoryId()Description copied from interface:IdentifiedDataSerializable
Returns DataSerializableFactory factory ID for this class.- Specified by:
getFactoryId
in interfaceIdentifiedDataSerializable
- Returns:
- factory ID
-
getClassId
public int getClassId()Description copied from interface:IdentifiedDataSerializable
Returns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
getClassId
in interfaceIdentifiedDataSerializable
- Returns:
- type ID
-
isDeny
public boolean isDeny()Returnstrue
when the permission should be subtracted (denied) instead of added (granted).- Returns:
true
for deny permissions- Since:
- 5.4
-
setDeny
Configures if this permission config is for a grant (false
, default) permission or deny (true
)- Parameters:
deny
- value to set- Returns:
- this instance of the
PermissionConfig
- Since:
- 5.4
-
writeData
Description copied from interface:DataSerializable
Writes object fields to output stream- Specified by:
writeData
in interfaceDataSerializable
- Parameters:
out
- output- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the output stream has been closed.
-
readData
Description copied from interface:DataSerializable
Reads fields from the input stream- Specified by:
readData
in interfaceDataSerializable
- Parameters:
in
- input- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the input stream has been closed.
-
equals
-
hashCode
public int hashCode() -
toString
-