public void foo() { var riakClient = TestingRiakClient.Get(); var storer = new RiakStorer(riakClient, new NullEventWriter()); riakClient.DeleteBucket(_bucketId.ToRiakIdentity(), RiakConstants.QuorumOptions.All); storer.Store(_bucketId, new[] { _eventA, _eventB, _eventC, _eventD }); }
public RiakPersistenceStrategy(IRiakClusterConfiguration riakClusterConfiguration, IEventReaderWriterPair eventReaderWriterPair) { if (riakClusterConfiguration == null) throw new ArgumentNullException("riakClusterConfiguration"); if (eventReaderWriterPair == null) throw new ArgumentNullException("eventReaderWriterPair"); _riakClient = new RiakCluster(riakClusterConfiguration, new RiakConnectionFactory()).CreateClient(); _storer = new RiakStorer(_riakClient, eventReaderWriterPair.Writer); _loader = new RiakLoader(_riakClient, eventReaderWriterPair.Reader); }