Package org.infinispan.persistence

Examples of org.infinispan.persistence.DummyInitializationContext


            .getDefaultCacheConfiguration(false)
            .persistence()
               .addStore(DummyInMemoryStoreConfigurationBuilder.class)
                  .storeName(storeName)
                  .create();
      store.init(new DummyInitializationContext(dummyConfiguration, null, marshaller(), new ByteBufferFactoryImpl(),
                                                new MarshalledEntryFactoryImpl(marshaller())));
      store.start();
      return store;
   }
View Full Code Here


            .getDefaultCacheConfiguration(false)
            .persistence()
               .addStore(SingleFileStoreConfigurationBuilder.class)
                  .location(this.tmpDirectory)
                  .create();
      store.init(new DummyInitializationContext(fileStoreConfiguration, getCache(), getMarshaller(), new ByteBufferFactoryImpl(),
                                                new MarshalledEntryFactoryImpl(getMarshaller())));
      store.start();
      return store;
   }
View Full Code Here

            .persistence()
               .addStore(SingleFileStoreConfigurationBuilder.class)
                  .location(this.tmpDirectory)
                  .maxEntries(1)
                  .create();
      store.init(new DummyInitializationContext(fileStoreConfiguration, getCache(), getMarshaller(),
                                                new ByteBufferFactoryImpl(),
                                                new MarshalledEntryFactoryImpl(getMarshaller())));
      store.start();
   }
View Full Code Here

   }

   private AdvancedAsyncCacheWriter createAsyncStore() throws PersistenceException {
      DummyInMemoryStore backendStore = createBackendStore("async2");
      AdvancedAsyncCacheWriter store = new AdvancedAsyncCacheWriter(backendStore);
      store.init(new DummyInitializationContext() {
         @Override
         public StreamingMarshaller getMarshaller() {
            return marshaller();
         }
      });
View Full Code Here

   protected AdvancedLoadWriteStore createStore() throws Exception {
      clearTempDir();
      fcs = new LevelDBStore();
      ConfigurationBuilder cb = new ConfigurationBuilder();
      LevelDBStoreConfiguration cfg = createCacheStoreConfig(cb.persistence());
      fcs.init(new DummyInitializationContext(cfg, getCache(), getMarshaller(), new ByteBufferFactoryImpl(),
                                              new MarshalledEntryFactoryImpl(getMarshaller())));
      fcs.start();
      return fcs;
   }
View Full Code Here

               .addStore(SingleFileStoreConfigurationBuilder.class)
                  .location(this.tmpDirectory)
                  .maxEntries(1)
                  .create();
      marshaller = new TestObjectStreamMarshaller();
      store.init(new DummyInitializationContext(fileStoreConfiguration, getCache(), marshaller,
                                                new ByteBufferFactoryImpl(),
                                                new MarshalledEntryFactoryImpl(marshaller)));
      store.start();
   }
View Full Code Here

         .async()
            .enable()
            .threadPoolSize(10);
      DummyInMemoryStore underlying = new DummyInMemoryStore();
      writer = new AdvancedAsyncCacheWriter(underlying);
      DummyInitializationContext ctx = new DummyInitializationContext(dummyCfg.create(), getCache(), marshaller(), new ByteBufferFactoryImpl(), new MarshalledEntryFactoryImpl(marshaller()));
      writer.init(ctx);
      writer.start();
      loader = new AdvancedAsyncCacheLoader(underlying, writer.getState());
      loader.init(ctx);
      loader.start();
View Full Code Here

         writer = new MockAsyncCacheWriter(key, v1Latch, v2Latch, endLatch, underlying);
         DummyInMemoryStoreConfigurationBuilder dummyCfg = TestCacheManagerFactory
               .getDefaultCacheConfiguration(false)
               .persistence().addStore(DummyInMemoryStoreConfigurationBuilder.class)
                  .storeName(m.getName());
         DummyInitializationContext ctx = new DummyInitializationContext(dummyCfg.create(), getCache(), marshaller(),
                                                                         new ByteBufferFactoryImpl(),
                                                                         new MarshalledEntryFactoryImpl(marshaller()));
         writer.init(ctx);
         writer.start();
         underlying.init(ctx);
View Full Code Here

      LockableStoreConfigurationBuilder lcscsBuilder = new LockableStoreConfigurationBuilder(builder.persistence());
      lcscsBuilder.async()
            .modificationQueueSize(10);

      writer = new AdvancedAsyncCacheWriter(underlying);
      writer.init(new DummyInitializationContext(lcscsBuilder.create(), getCache(), null, new ByteBufferFactoryImpl(),
                                                 new MarshalledEntryFactoryImpl(null)));
      writer.start();
      try {
         final CountDownLatch done = new CountDownLatch(1);
View Full Code Here

   }

   private AdvancedAsyncCacheWriter createAsyncStore() throws PersistenceException {
      DummyInMemoryStore backendStore = createBackendStore("async2");
      AdvancedAsyncCacheWriter store = new AdvancedAsyncCacheWriter(backendStore);
      store.init(new DummyInitializationContext() {
         @Override
         public StreamingMarshaller getMarshaller() {
            return marshaller;
         }
      });
View Full Code Here

TOP

Related Classes of org.infinispan.persistence.DummyInitializationContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.