Package io.deephaven.kv
Class KeyPermissions
java.lang.Object
io.deephaven.kv.KeyPermissions
An immutable collection of non-overlapping read and write permissions, as represented by
key prefix sets.
The permissions are currently inclusive-only - ie, it's not currently possible to explicitly
exclude permissions. We may choose to model this in the future with a KeyPrefixSet for
readExclusions and writeExclusions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(KeyPermissions permissions) booleanThese are the key prefixes that the role has/needs read access to.These are the key prefixes that the role has/needs write access to.inthashCode()static KeyPermissionsnone()static KeyPermissionsA helper to create read-only permissions from the given prefixesstatic KeyPermissionsA helper to create mirrored read/write permissions from the given prefixestoString()union(KeyPermissions other) static KeyPermissions
-
Constructor Details
-
KeyPermissions
- Parameters:
reads- the read permissionswrites- the write permissions
-
-
Method Details
-
unlimited
- Returns:
- the unlimited permissions, which represents all read and write permissions
-
none
- Returns:
- the none permissions, which represents no read and write permissions
-
r
A helper to create read-only permissions from the given prefixes -
rw
A helper to create mirrored read/write permissions from the given prefixes -
getPrefixedReadPermissions
These are the key prefixes that the role has/needs read access to. -
getPrefixedWritePermissions
These are the key prefixes that the role has/needs write access to. -
contains
- Returns:
- true iff the current permissions are at least as permissive as the passed in permissions
-
union
- Parameters:
other- the other permissions- Returns:
- the combined permissions, representing the union of this permissions and
other
-
equals
-
hashCode
public int hashCode() -
toString
-