Constructor and Description |
---|
MountInfo(java.lang.String name,
boolean readOnly,
java.util.List<java.lang.String> pathsSupportingFragments,
java.util.List<java.lang.String> includedPaths) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.util.Set<java.lang.String> |
getIncludedPaths() |
java.lang.String |
getName()
Name of the mount.
|
java.lang.String |
getPathFragmentName()
Returns fragment name which can be used to construct node name
used for storing meta content belonging to path under this
Mount . |
java.util.Set<java.lang.String> |
getPathsSupportingFragments() |
int |
hashCode() |
boolean |
isDefault()
Checks whether current mount is the default mount.
|
boolean |
isDirectlyUnder(java.lang.String path)
Checks if this mount directly falls under given path.
|
boolean |
isMounted(java.lang.String path)
Checks if given path belongs to this
Mount |
boolean |
isReadOnly()
Checks whether the mount is marked as read only.
|
boolean |
isSupportFragment(java.lang.String path)
Checks if this mount supports mounting nodes containing the fragment
(see
Mount.getPathFragmentName() ) under the given path. |
boolean |
isSupportFragmentUnder(java.lang.String path)
Checks if any path supporting the fragments falls under the specified path.
|
boolean |
isUnder(java.lang.String path)
Checks if this mount falls under given path.
|
java.lang.String |
toString() |
public MountInfo(java.lang.String name, boolean readOnly, java.util.List<java.lang.String> pathsSupportingFragments, java.util.List<java.lang.String> includedPaths)
public boolean isUnder(java.lang.String path)
Mount
For e.g. if a mount consist of '/etc/config'. Then if path is
public boolean isDirectlyUnder(java.lang.String path)
Mount
For e.g. if a mount consist of '/etc/my/config'. Then if path is
isDirectlyUnder
in interface Mount
path
- path to checkpublic boolean isMounted(java.lang.String path)
Mount
Mount
A path belongs to a Mount in two scenarios:
The fragment check has a higher priority, and the presence of a fragment name in the path always decides the mount this path belongs to.
isMounted
in interface Mount
path
- path to checkMount.getPathFragmentName()
public java.lang.String getName()
Mount
@Mount
is the default mount, an empty string is returnedpublic boolean isReadOnly()
Mount
isReadOnly
in interface Mount
public boolean isDefault()
Mount
The Default mount includes the root path and all other paths which are not part of any other mount.
public boolean isSupportFragment(java.lang.String path)
Mount
Mount.getPathFragmentName()
) under the given path.isSupportFragment
in interface Mount
path
- ancestor pathpublic boolean isSupportFragmentUnder(java.lang.String path)
Mount
isSupportFragmentUnder
in interface Mount
path
- ancestor pathpublic java.lang.String getPathFragmentName()
Mount
Mount
.
Such a node name would be used by NodeStore
to determine the storage for nodes under those paths.
Fragment name is formatted as 'oak:mount-<mount name>'
For e.g. for mount name 'private' the fragment name would be
oak:mount-private
. This can be then used to construct
node name like oak:mount-private-index
and then any derived
content for path under this mount would be stored as child node under
oak:mount-private-index like /fooIndex/oak:mount-private-index/foo
.
Such paths would then be stored in a separate store which would only be
storing paths belonging to that mount
If this Mount
is the default mount, an empty string is returned
getPathFragmentName
in interface Mount
public java.util.Set<java.lang.String> getPathsSupportingFragments()
public java.util.Set<java.lang.String> getIncludedPaths()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved