Search in sources :

Example 6 with StaticArrayEntry

use of com.thinkaurelius.titan.diskstorage.util.StaticArrayEntry in project titan by thinkaurelius.

the class StaticArrayEntryTest method testTTLMetadata.

@Test
public void testTTLMetadata() throws Exception {
    WriteBuffer wb = new WriteByteBuffer(128);
    wb.putInt(1).putInt(2).putInt(3).putInt(4);
    int valuePos = wb.getPosition();
    wb.putInt(5).putInt(6);
    StaticArrayEntry entry = new StaticArrayEntry(wb.getStaticBuffer(), valuePos);
    entry.setMetaData(EntryMetaData.TTL, 42);
    assertEquals(42, entry.getMetaData().get(EntryMetaData.TTL));
}
Also used : WriteByteBuffer(com.thinkaurelius.titan.diskstorage.util.WriteByteBuffer) StaticArrayEntry(com.thinkaurelius.titan.diskstorage.util.StaticArrayEntry) Test(org.junit.Test)

Aggregations

StaticArrayEntry (com.thinkaurelius.titan.diskstorage.util.StaticArrayEntry)6 WriteByteBuffer (com.thinkaurelius.titan.diskstorage.util.WriteByteBuffer)3 Test (org.junit.Test)3 LongArrayList (com.carrotsearch.hppc.LongArrayList)2 KeyValueEntry (com.thinkaurelius.titan.diskstorage.keycolumnvalue.keyvalue.KeyValueEntry)2 DataOutput (com.thinkaurelius.titan.graphdb.database.serialize.DataOutput)2 LongHashSet (com.carrotsearch.hppc.LongHashSet)1 LongSet (com.carrotsearch.hppc.LongSet)1 IndexEntry (com.thinkaurelius.titan.diskstorage.indexing.IndexEntry)1 IndexTransaction (com.thinkaurelius.titan.diskstorage.indexing.IndexTransaction)1 DirectionID (com.thinkaurelius.titan.graphdb.database.idhandling.IDHandler.DirectionID)1 InternalRelation (com.thinkaurelius.titan.graphdb.internal.InternalRelation)1 InternalRelationType (com.thinkaurelius.titan.graphdb.internal.InternalRelationType)1 InternalVertex (com.thinkaurelius.titan.graphdb.internal.InternalVertex)1 EdgeDirection (com.thinkaurelius.titan.graphdb.relations.EdgeDirection)1 RelationIdentifier (com.thinkaurelius.titan.graphdb.relations.RelationIdentifier)1 CompositeIndexType (com.thinkaurelius.titan.graphdb.types.CompositeIndexType)1 MixedIndexType (com.thinkaurelius.titan.graphdb.types.MixedIndexType)1 ImplicitKey (com.thinkaurelius.titan.graphdb.types.system.ImplicitKey)1 AtomicLong (java.util.concurrent.atomic.AtomicLong)1