private Pool<XmsPooledProducer> PoolFactory(XmsDestination destination)
 {
     log.Info("Going to create new producer pool for destination {0}".FormatWith(destination));
     //TODO: make this configurable
     var store = new StackStore<XmsPooledProducer>(60.Seconds(), 30.Seconds());
     var pool = new Pool<XmsPooledProducer>(10, p => PlainProducerFactory(p, destination), store);
     return pool;
 }
Ejemplo n.º 2
0
 public void Setup()
 {
     foo1 = new Foo();
     foo2 = new Foo();
     foo3 = new Foo();
     expiration = 1.Seconds();
     cleanUpInterval = 10.Milliseconds();
     store = new StackStore<Foo>(expiration, cleanUpInterval, false);
     Clock.Freeze();
 }
 private Pool<XmsPooledConsumer> CreatePool(XmsAddress address)
 {
     log.Info("Going to create new consumer pool for address {0}".FormatWith(address));
     //TODO: make this configurable
     var store = new StackStore<XmsPooledConsumer>(60.Seconds(), 30.Seconds());
     var pool = new Pool<XmsPooledConsumer>(10, p =>
         {
             log.Info("Going to create new plain consumer for address {0}".FormatWith(address));
             var consumer = new XmsConsumer(address, transactional);
             var pooled = new XmsPooledConsumer(p, consumer);
             return pooled;
         }, store);
     return pool;
 }
 public void SetUp()
 {
     address = TestTargets.InputQueue;
     XmsUtilities.Purge(address);
     store = new StackStore<XmsPooledProducer>();
 }
 public void SetUp()
 {
     destination = Target.Input;
     XmsUtilities.Purge(destination);
     store = new StackStore<XmsPooledProducer>();
 }