22
33import com .scalar .db .common .error .CoreError ;
44import com .scalar .db .exception .storage .ExecutionException ;
5- import java .util .Collections ;
65import java .util .Map ;
76
87/** An administrative interface for the replication feature. */
@@ -31,10 +30,7 @@ default void createReplicationTables(Map<String, String> options) throws Executi
3130 */
3231 default void createReplicationTables (boolean ifNotExist , Map <String , String > options )
3332 throws ExecutionException {
34- if (ifNotExist && replicationTablesExist ()) {
35- return ;
36- }
37- createReplicationTables (options );
33+ throw new UnsupportedOperationException (CoreError .REPLICATION_NOT_ENABLED .buildMessage ());
3834 }
3935
4036 /**
@@ -48,10 +44,7 @@ default void createReplicationTables(boolean ifNotExist, Map<String, String> opt
4844 * @throws ExecutionException if the operation fails
4945 */
5046 default void createReplicationTables (boolean ifNotExist ) throws ExecutionException {
51- if (ifNotExist && replicationTablesExist ()) {
52- return ;
53- }
54- createReplicationTables (Collections .emptyMap ());
47+ throw new UnsupportedOperationException (CoreError .REPLICATION_NOT_ENABLED .buildMessage ());
5548 }
5649
5750 /**
@@ -60,7 +53,7 @@ default void createReplicationTables(boolean ifNotExist) throws ExecutionExcepti
6053 * @throws ExecutionException if the operation fails
6154 */
6255 default void createReplicationTables () throws ExecutionException {
63- createReplicationTables ( Collections . emptyMap ());
56+ throw new UnsupportedOperationException ( CoreError . REPLICATION_NOT_ENABLED . buildMessage ());
6457 }
6558
6659 /**
@@ -83,10 +76,7 @@ default void dropReplicationTables() throws ExecutionException {
8376 * @throws ExecutionException if the operation fails
8477 */
8578 default void dropReplicationTables (boolean ifExist ) throws ExecutionException {
86- if (ifExist && !replicationTablesExist ()) {
87- return ;
88- }
89- dropReplicationTables ();
79+ throw new UnsupportedOperationException (CoreError .REPLICATION_NOT_ENABLED .buildMessage ());
9080 }
9181
9282 /**
0 commit comments