protected class CassandraServiceImpl.WriterImpl extends java.lang.Object implements CassandraService.Writer<T>
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
write(T entity)
Write the entity to the Cassandra instance, using
Mapper obtained with the MappingManager . |
public void write(T entity) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Mapper
obtained with the MappingManager
. This method uses Mapper.saveAsync(Object)
method, which is
asynchronous. Beam will wait for all futures to complete, to guarantee all writes have
succeeded.write
in interface CassandraService.Writer<T>
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public void close() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
close
in interface java.lang.AutoCloseable
java.util.concurrent.ExecutionException
java.lang.InterruptedException