@Override protected LocalLockMediator<StoreTransaction> getDefaultMediator() { throw new JanusGraphConfigurationException("Local lock mediator prefix must not be empty or null"); } }
private static String getUid(Configuration config) { final String localHostErrMsg = "Cannot determine local host"; final String uid; if (config.has(GraphDatabaseConfiguration.UNIQUE_INSTANCE_ID_HOSTNAME) && config.get(GraphDatabaseConfiguration.UNIQUE_INSTANCE_ID_HOSTNAME)) { try { uid = Inet4Address.getLocalHost().getHostName(); } catch (UnknownHostException e) { throw new JanusGraphConfigurationException(localHostErrMsg, e); } } else { final byte[] addrBytes; try { addrBytes = Inet4Address.getLocalHost().getAddress(); } catch (UnknownHostException e) { throw new JanusGraphConfigurationException(localHostErrMsg, e); } uid = new String(Hex.encodeHex(addrBytes)); } return uid; }
@Override public Locker apply(String lockerName) { KeyColumnValueStore lockerStore; try { lockerStore = storeManager.openDatabase(lockerName); } catch (BackendException e) { throw new JanusGraphConfigurationException("Could not retrieve store named " + lockerName + " for locker configuration", e); } return new ConsistentKeyLocker.Builder(lockerStore, storeManager).fromConfig(configuration).build(); } };
lockerCreator = REGISTERED_LOCKERS.get(lockBackendName); } else { throw new JanusGraphConfigurationException("Unknown lock backend \"" + lockBackendName + "\". Known lock backends: " + Joiner.on(", ").join(REGISTERED_LOCKERS.keySet()) + ".");
throw new JanusGraphConfigurationException(String.format(template, Joiner.on(", ").join(optionsWithDiscrepancies), ManagementSystem.class.getSimpleName()));