public MutatorImpl(Keyspace keyspace) { this(keyspace, TypeInferringSerializer.<K> get()); }
public MutatorImpl(Keyspace keyspace, BatchSizeHint sizeHint) { this(keyspace, TypeInferringSerializer.<K> get(), sizeHint); }
@Override public <N> MutationResult incrementCounter(final K key, final String cf, final N columnName, final long increment) { return insertCounter(key, cf, new HCounterColumnImpl<N>(columnName, increment, TypeInferringSerializer.<N> get())); }
@Override public <K> SliceQuery<K, ByteBuffer, ByteBuffer> createSliceQuery() { return createSliceQuery(TypeInferringSerializer.<K>get(), ByteBufferSerializer.get(), ByteBufferSerializer.get()); }
@Override public <K> SuperSliceQuery<K, ByteBuffer, ByteBuffer, ByteBuffer> createSuperSliceQuery() { return createSuperSliceQuery(TypeInferringSerializer.<K>get(), ByteBufferSerializer.get(), ByteBufferSerializer.get(), ByteBufferSerializer.get()); }
/** * collapse the state of the active HSuperColumn */ void updateInternal() { // HSuperColumnImpl needs a refactor, this construction is lame. // the value serializer is not used in HSuperColumnImpl, so this is safe for name if ( !subColumns.isEmpty() ) { log.debug("Adding column {} for key {} and cols {}", new Object[]{getCurrentSuperColumn(), getCurrentKey(), subColumns}); HSuperColumnImpl<SN, N, ?> column = new HSuperColumnImpl(getCurrentSuperColumn(), subColumns, 0, template.getTopSerializer(), template.getSubSerializer(), TypeInferringSerializer.get()); mutator.addInsertion(getCurrentKey(), template.getColumnFamily(), column); } }
@Test public void testByteConversions() { TypeInferringSerializer<Object> ext = TypeInferringSerializer.get(); ByteBuffer byteBuffer = ext.toByteBuffer("bytes".getBytes()); Assert.assertTrue(byteBuffer != null); }
@SuppressWarnings("rawtypes") private void test(Object object) { TypeInferringSerializer<Object> ext = TypeInferringSerializer.get(); ByteBuffer bytes = ext.toByteBuffer(object); Serializer ser = SerializerTypeInferer.getSerializer(object.getClass()); Object target = ser.fromByteBuffer(bytes); assertEquals(object, target); }
public MutatorImpl(Keyspace keyspace) { this(keyspace, TypeInferringSerializer.<K> get()); }