public CompletableFuture < CreateScopeStatus > createScope ( final String scope ) { Exceptions . checkNotNullOrEmpty ( scope , "scope" ) ; try { NameUtils . validateScopeName ( scope ) ; } catch ( IllegalArgumentException | NullPointerException e ) { log . warn ( "Create scope failed due to invalid scope name {}" , scope ) ; return CompletableFuture . completedFuture ( CreateScopeStatus . newBuilder ( ) . setStatus ( CreateScopeStatus . Status . INVALID_SCOPE_NAME ) . build ( ) ) ; } return streamStore . createScope ( scope ) ; }
Controller Service API to create scope .