Package com.thinkaurelius.titan.diskstorage.keycolumnvalue

Examples of com.thinkaurelius.titan.diskstorage.keycolumnvalue.KeySliceQuery


        List<Entry>[] results = (List<Entry>[])new List[keys.size()];
        List<StaticBuffer> remainingKeys = new ArrayList<StaticBuffer>(keys.size());
        KeySliceQuery[] ksqs = new KeySliceQuery[keys.size()];
        for (int i=0;i<keys.size();i++) {
            StaticBuffer key = keys.get(i);
            ksqs[i] = new KeySliceQuery(key,query);
            List<Entry> result = null;
            if (!isExpired(ksqs[i])) result = cache.getIfPresent(ksqs[i]);
            else ksqs[i]=null;
            if (result!=null) results[i]=result;
            else remainingKeys.add(key);
View Full Code Here


    }

    private void recordLockGetSlice(List<Entry> returnedEntries) throws StorageException {
        final StaticBuffer lower = ByteBufferUtil.zeroBuffer(9);
        final StaticBuffer upper = ByteBufferUtil.oneBuffer(9);
        final KeySliceQuery ksq = new KeySliceQuery(defaultLockKey, lower, upper);
        expect(store.getSlice(eq(ksq), eq(defaultTx))).andReturn(returnedEntries);
    }
View Full Code Here

    }

    private void recordExceptionalLockGetSlice(Throwable t) throws StorageException {
        final StaticBuffer lower = ByteBufferUtil.zeroBuffer(9);
        final StaticBuffer upper = ByteBufferUtil.oneBuffer(9);
        final KeySliceQuery ksq = new KeySliceQuery(defaultLockKey, lower, upper);
        expect(store.getSlice(eq(ksq), eq(defaultTx))).andThrow(t);
    }
View Full Code Here

        TitanKey key = (TitanKey) pc.getKey();
        Preconditions.checkArgument(key.hasIndex(Titan.Token.STANDARD_INDEX, resultType.getElementType()),
                "Cannot retrieve for given property key - it does not have an index [%s]", key.getName());
        Object value = pc.getValue();
        StaticBuffer column = getUniqueIndexColumn(key);
        KeySliceQuery sq = new KeySliceQuery(getIndexKey(value), column, SliceQuery.pointRange(column), ((InternalType) key).isStatic(Direction.IN)).setLimit(limit);
        List<Entry> r;
        if (resultType == ElementType.VERTEX) {
            r = tx.vertexIndexQuery(sq);
        } else {
            r = tx.edgeIndexQuery(sq);
View Full Code Here

TOP

Related Classes of com.thinkaurelius.titan.diskstorage.keycolumnvalue.KeySliceQuery

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.