Class SchemaSet
java.lang.Object
org.apache.curator.framework.schema.SchemaSet
Collection of all schemas for a Curator instance
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SchemaSet
Return the default (empty) schema setstatic String
getNamedPath
(CuratorFramework client, String name) Utility to return a ZNode path for the given namegetNamedSchema
(String name) Return the schema with the given key/nameFind the first matching schema for the path and return itReturn the schemasBuild a user displayable documentation string for the schemas in this set
-
Constructor Details
-
SchemaSet
Define a schema set. Schemas are matched in a well defined order:- Exact match on full path (i.e. non-regex)
- Match on the first regex path, searched in the order given to this constructor
- Parameters:
schemas
- the schemas for the set.useDefaultSchema
- if true, return a default schema when there is no match. Otherwise, an exception is thrown
-
-
Method Details
-
getDefaultSchemaSet
Return the default (empty) schema set- Returns:
- default schema set
-
getSchemas
Return the schemas- Returns:
- schemas
-
getSchema
Find the first matching schema for the path and return it- Parameters:
path
- ZNode full path- Returns:
- matching schema or a default schema
-
getNamedPath
Utility to return a ZNode path for the given name- Parameters:
client
- Curator clientname
- path/schema name- Returns:
- ZNode path
-
getNamedSchema
Return the schema with the given key/name- Parameters:
name
- name- Returns:
- schema or null
-
toDocumentation
Build a user displayable documentation string for the schemas in this set- Returns:
- documentation
-