| | |
| | | * Header, with the fields enclosed by brackets [] replaced by your own identifying |
| | | * information: "Portions Copyright [year] [name of copyright owner]". |
| | | * |
| | | * Copyright 2023 3A Systems, LLC. |
| | | * Copyright 2023-2024 3A Systems, LLC. |
| | | */ |
| | | package org.opends.server.backends.cassandra; |
| | | |
| | |
| | | public void open(AccessMode accessMode) throws Exception { |
| | | this.accessMode=accessMode; |
| | | session=CqlSession.builder() |
| | | .withApplicationName("OpenDJ "+config.getDBDirectory()+"."+config.getBackendId()) |
| | | .withApplicationName("OpenDJ "+getKeyspaceName()+"."+config.getBackendId()) |
| | | .withConfigLoader(DriverConfigLoader.fromDefaults(Storage.class.getClassLoader())) |
| | | .build(); |
| | | if (AccessMode.READ_WRITE.equals(accessMode)) { |
| | |
| | | } |
| | | |
| | | String getKeyspaceName() { |
| | | return "\""+config.getDBDirectory().replaceAll("[^a-zA-z0-9_]", "_")+"\""; |
| | | return "\""+System.getProperty("keyspace",config.getDBDirectory()).replaceAll("[^a-zA-z0-9_]", "_")+"\""; |
| | | } |
| | | |
| | | String getTableName() { |