Package com.thinkaurelius.titan.core

Examples of com.thinkaurelius.titan.core.TitanConfigurationException


            return this;
        }

        @Override
        protected LocalLockMediator<StoreTransaction> getDefaultMediator() {
            throw new TitanConfigurationException("Local lock mediator prefix must not be empty or null");
        }
View Full Code Here


                storageConfig.getString(GraphDatabaseConfiguration.LOCK_BACKEND,
                        GraphDatabaseConfiguration.LOCK_BACKEND_DEFAULT);
        if (REGISTERED_LOCKERS.containsKey(lockBackendName)) {
            lockerCreator = REGISTERED_LOCKERS.get(lockBackendName);
        } else {
            throw new TitanConfigurationException("Unknown lock backend \"" +
                    lockBackendName + "\".  Known lock backends: " +
                    Joiner.on(", ").join(REGISTERED_LOCKERS.keySet()) + ".");
        }
        // Never used for backends that have innate transaction support, but we
        // want to maintain the non-null invariant regardless; it will default
View Full Code Here

            String ridText =
                    config.getString(GraphDatabaseConfiguration.INSTANCE_RID_RAW_KEY);
            try {
                tentativeRid = Hex.decodeHex(ridText.toCharArray());
            } catch (DecoderException e) {
                throw new TitanConfigurationException("Could not decode hex value", e);
            }

            log.debug("Set rid from hex string: 0x{}", ridText);
        } else {
            final byte[] endBytes;

            if (config.containsKey(GraphDatabaseConfiguration.INSTANCE_RID_SHORT_KEY)) {

                short s = config.getShort(
                        GraphDatabaseConfiguration.INSTANCE_RID_SHORT_KEY);

                endBytes = new byte[2];

                endBytes[0] = (byte) ((s & 0x0000FF00) >> 8);
                endBytes[1] = (byte) (s & 0x000000FF);
            } else {
                //endBytes = ManagementFactory.getRuntimeMXBean().getName().getBytes();
                endBytes = new StringBuilder(String.valueOf(Thread.currentThread().getId()))
                            .append("@")
                            .append(ManagementFactory.getRuntimeMXBean().getName())
                            .toString()
                            .getBytes();
            }

            byte[] addrBytes;
            try {
                addrBytes = Inet4Address.getLocalHost().getAddress();
            } catch (UnknownHostException e) {
                throw new TitanConfigurationException("Unknown host specified", e);
            }

            tentativeRid = new byte[addrBytes.length + endBytes.length];
            System.arraycopy(addrBytes, 0, tentativeRid, 0, addrBytes.length);
            System.arraycopy(endBytes, 0, tentativeRid, addrBytes.length, endBytes.length);
View Full Code Here

TOP

Related Classes of com.thinkaurelius.titan.core.TitanConfigurationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.