Package voldemort.common

Examples of voldemort.common.OpTimeMap


    @Override
    public void setUp() throws Exception {
        super.setUp();
        // Do not change the magic constants in the next two constructors! The
        // unit tests assert on specific delays occurring.
        OpTimeMap queued = new OpTimeMap(10, 20, 30, 40, 50);
        OpTimeMap concurrent = new OpTimeMap(50, 40, 30, 20, 10);
        this.store = new SlowStorageEngine<ByteArray, byte[], byte[]>(new InMemoryStorageEngine<ByteArray, byte[], byte[]>("test"),
                                                                      queued,
                                                                      concurrent);
    }
View Full Code Here


        this.mysqlPassword = props.getString("mysql.password", "");
        this.mysqlHost = props.getString("mysql.host", "localhost");
        this.mysqlPort = props.getInt("mysql.port", 3306);
        this.mysqlDatabaseName = props.getString("mysql.database", "voldemort");

        this.testingSlowQueueingDelays = new OpTimeMap(0);
        this.testingSlowQueueingDelays.setOpTime(VoldemortOpCode.GET_OP_CODE,
                                                 props.getInt("testing.slow.queueing.get.ms", 0));
        this.testingSlowQueueingDelays.setOpTime(VoldemortOpCode.GET_ALL_OP_CODE,
                                                 props.getInt("testing.slow.queueing.getall.ms", 0));
        this.testingSlowQueueingDelays.setOpTime(VoldemortOpCode.GET_VERSION_OP_CODE,
                                                 props.getInt("testing.slow.queueing.getversions.ms",
                                                              0));
        this.testingSlowQueueingDelays.setOpTime(VoldemortOpCode.PUT_OP_CODE,
                                                 props.getInt("testing.slow.queueing.put.ms", 0));
        this.testingSlowQueueingDelays.setOpTime(VoldemortOpCode.DELETE_OP_CODE,
                                                 props.getInt("testing.slow.queueing.delete.ms", 0));

        this.testingSlowConcurrentDelays = new OpTimeMap(0);
        this.testingSlowConcurrentDelays.setOpTime(VoldemortOpCode.GET_OP_CODE,
                                                   props.getInt("testing.slow.concurrent.get.ms", 0));
        this.testingSlowConcurrentDelays.setOpTime(VoldemortOpCode.GET_ALL_OP_CODE,
                                                   props.getInt("testing.slow.concurrent.getall.ms",
                                                                0));
View Full Code Here

            return new SlowStorageEngine<ByteArray, byte[], byte[]>(new InMemoryStorageEngine<ByteArray, byte[], byte[]>(storeDef.getName()),
                                                                    this.voldemortConfig.testingGetSlowQueueingDelays(),
                                                                    this.voldemortConfig.testingGetSlowConcurrentDelays());
        }
        return new SlowStorageEngine<ByteArray, byte[], byte[]>(new InMemoryStorageEngine<ByteArray, byte[], byte[]>(storeDef.getName()),
                                                                new OpTimeMap(0),
                                                                new OpTimeMap(0));
    }
View Full Code Here

    private final StorageEngine<K, V, T> innerStorageEngine;
    private final OpTimeMap queueingDelays;
    private final OpTimeMap concurrentDelays;

    public SlowStorageEngine(StorageEngine<K, V, T> innerStorageEngine) {
        this(innerStorageEngine, new OpTimeMap(0), new OpTimeMap(0));
    }
View Full Code Here

    public TimeoutConfig(long globalTimeoutMs) {
        this(globalTimeoutMs, DEFAULT_ALLOW_PARTIAL_GETALLS);
    }

    public TimeoutConfig(long globalTimeoutMs, boolean allowPartialGetAlls) {
        timeoutMap = new OpTimeMap(globalTimeoutMs);
        setPartialGetAllAllowed(allowPartialGetAlls);
    }
View Full Code Here

                         long putTimeoutMs,
                         long deleteTimeoutMs,
                         long getAllTimeoutMs,
                         long getVersionsTimeoutMs,
                         boolean allowPartialGetAlls) {
        timeoutMap = new OpTimeMap(getTimeoutMs,
                                   putTimeoutMs,
                                   deleteTimeoutMs,
                                   getAllTimeoutMs,
                                   getVersionsTimeoutMs);
        setPartialGetAllAllowed(allowPartialGetAlls);
View Full Code Here

TOP

Related Classes of voldemort.common.OpTimeMap

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.