@@ -284,7 +284,7 @@ private static String serviceId(String graphSpace, Service.ServiceType type,
284284 .replace ("_" , "-" ).toLowerCase ();
285285 }
286286
287- public boolean usePD () {
287+ public boolean isPDEnabled () {
288288 return this .PDExist ;
289289 }
290290
@@ -1235,7 +1235,7 @@ private void dropGraphLocal(HugeGraph graph) {
12351235
12361236 public HugeGraph createGraph (String graphSpace , String name , String creator ,
12371237 Map <String , Object > configs , boolean init ) {
1238- if (!usePD ()) {
1238+ if (!isPDEnabled ()) {
12391239 // Extract nickname from configs
12401240 String nickname ;
12411241 if (configs .get ("nickname" ) != null ) {
@@ -1949,7 +1949,7 @@ public Set<String> getServiceUrls(String graphSpace, String service,
19491949 public HugeGraph graph (String graphSpace , String name ) {
19501950 String key = String .join (DELIMITER , graphSpace , name );
19511951 Graph graph = this .graphs .get (key );
1952- if (graph == null && usePD ()) {
1952+ if (graph == null && isPDEnabled ()) {
19531953 Map <String , Map <String , Object >> configs =
19541954 this .metaManager .graphConfigs (graphSpace );
19551955 // If current server registered graph space is not DEFAULT, only load graph creation
@@ -1993,7 +1993,7 @@ public void dropGraphLocal(String name) {
19931993 }
19941994
19951995 public void dropGraph (String graphSpace , String name , boolean clear ) {
1996- if (!usePD ()) {
1996+ if (!isPDEnabled ()) {
19971997 dropGraphLocal (name );
19981998 return ;
19991999 }
@@ -2098,7 +2098,7 @@ private void checkOptionsUnique(String graphSpace,
20982098 public Set <String > graphs (String graphSpace ) {
20992099 Set <String > graphs = new HashSet <>();
21002100
2101- if (!usePD ()) {
2101+ if (!isPDEnabled ()) {
21022102 for (String key : this .graphs .keySet ()) {
21032103 String [] parts = key .split (DELIMITER );
21042104 if (parts [0 ].equals (graphSpace )) {
@@ -2115,7 +2115,7 @@ public Set<String> graphs(String graphSpace) {
21152115 }
21162116
21172117 public GraphSpace graphSpace (String name ) {
2118- if (!usePD ()) {
2118+ if (!isPDEnabled ()) {
21192119 return new GraphSpace ("DEFAULT" );
21202120 }
21212121 GraphSpace space = this .graphSpaces .get (name );
@@ -2164,7 +2164,7 @@ private MapConfiguration buildConfig(Map<String, Object> configs) {
21642164 public void graphReadMode (String graphSpace , String graphName ,
21652165 GraphReadMode readMode ) {
21662166
2167- if (!usePD ()) {
2167+ if (!isPDEnabled ()) {
21682168 HugeGraph g = this .graph (spaceGraphName (graphSpace , graphName ));
21692169 g .readMode (readMode );
21702170 return ;
0 commit comments