public void createNamespace ( ) { Map < String , String > namespaceAnnotations = annotationProvider . create ( session . getId ( ) , Constants . RUNNING_STATUS ) ; if ( namespaceService . exists ( session . getNamespace ( ) ) ) { //namespace exists } else if ( configuration . isNamespaceLazyCreateEnabled ( ) ) { namespaceService . create ( session . getNamespace ( ) , namespaceAnnotations ) ; } else { throw new IllegalStateException ( "Namespace [" + session . getNamespace ( ) + "] doesn't exist and lazily creation of namespaces is disabled. " + "Either use an existing one, or set `namespace.lazy.enabled` to true." ) ; } }
Creates a namespace if needed .