Package org.infinispan.configuration.cache

Examples of org.infinispan.configuration.cache.ConfigurationBuilder.persistence()


      ConfigurationBuilder builder = holder.getCurrentConfigurationBuilder();

      ElementJdbc element = ElementJdbc.forName(reader.getLocalName());
      switch (element) {
      case STRING_KEYED_JDBC_STORE: {
         parseStringKeyedJdbcStore(reader, builder.persistence());
         break;
      }
      case BINARY_KEYED_JDBC_STORE: {
         parseBinaryKeyedJdbcStore(reader, builder.persistence());
         break;
View Full Code Here


      case STRING_KEYED_JDBC_STORE: {
         parseStringKeyedJdbcStore(reader, builder.persistence());
         break;
      }
      case BINARY_KEYED_JDBC_STORE: {
         parseBinaryKeyedJdbcStore(reader, builder.persistence());
         break;
      }
      case MIXED_KEYED_JDBC_STORE: {
         parseMixedKeyedJdbcStore(reader, builder.persistence());
         break;
View Full Code Here

      case BINARY_KEYED_JDBC_STORE: {
         parseBinaryKeyedJdbcStore(reader, builder.persistence());
         break;
      }
      case MIXED_KEYED_JDBC_STORE: {
         parseMixedKeyedJdbcStore(reader, builder.persistence());
         break;
      }
      default: {
         throw ParseUtils.unexpectedElement(reader);
      }
View Full Code Here

      ConfigurationBuilder builder = holder.getCurrentConfigurationBuilder();

      Element element = Element.forName(reader.getLocalName());
      switch (element) {
      case REMOTE_STORE: {
         parseRemoteStore(reader, builder.persistence(), holder.getClassLoader());
         break;
      }
      default: {
         throw ParseUtils.unexpectedElement(reader);
      }
View Full Code Here

      sourceContainer = TestCacheManagerFactory.createCacheManager(serverBuilder);
      sourceServerCache = sourceContainer.getCache();
      sourceServer = RestTestingUtil.startRestServer(sourceContainer);

      ConfigurationBuilder targetConfigurationBuilder = TestCacheManagerFactory.getDefaultCacheConfiguration(false);
      targetConfigurationBuilder.persistence().addStore(RestStoreConfigurationBuilder.class).host("localhost").port(sourceServer.getPort())
            .path("/rest/" + BasicCacheContainer.DEFAULT_CACHE_NAME).metadataHelper(MimeMetadataHelper.class).locking().isolationLevel(IsolationLevel.NONE);

      targetContainer = TestCacheManagerFactory.createCacheManager(targetConfigurationBuilder);
      targetServerCache = targetContainer.getCache();
      targetServer = RestTestingUtil.startRestServer(targetContainer, sourceServer.getPort() + 10);
View Full Code Here

   @Override
   protected AdvancedLoadWriteStore createStore() throws Exception {
      clearTempDir();
      LevelDBStore fcs = new LevelDBStore();
      ConfigurationBuilder cb = TestCacheManagerFactory.getDefaultCacheConfiguration(false);
      createCacheStoreConfig(cb.persistence());
      fcs.init(createContext(cb.build()));
      return fcs;
   }
}
View Full Code Here

      ConfigurationBuilder builder = holder.getCurrentConfigurationBuilder();

      Element element = Element.forName(reader.getLocalName());
      switch (element) {
      case REMOTE_STORE: {
         parseRemoteStore(reader, builder.persistence(), holder.getClassLoader());
         break;
      }
      default: {
         throw ParseUtils.unexpectedElement(reader);
      }
View Full Code Here

   public void readElement(XMLExtendedStreamReader reader, ConfigurationBuilderHolder holder) throws XMLStreamException {
      ConfigurationBuilder builder = holder.getCurrentConfigurationBuilder();
      Element element = Element.forName(reader.getLocalName());
      switch (element) {
         case LEVELDB_STORE: {
            parseLevelDBCacheStore(reader, builder.persistence().addStore(LevelDBStoreConfigurationBuilder.class));
            break;
         }
         default: {
            throw ParseUtils.unexpectedElement(reader);
         }
View Full Code Here

   // Methods to build the String and Binary Configurations.

   private JdbcStringBasedStoreConfiguration buildStringStoreConfiguration(JdbcMixedStoreConfiguration configuration){
      ConfigurationBuilder builder = new ConfigurationBuilder();
      JdbcStringBasedStoreConfigurationBuilder stringBuilder = builder.persistence().addStore
            (JdbcStringBasedStoreConfigurationBuilder.class).manageConnectionFactory(false);
      stringBuilder.
            key2StringMapper(configuration.key2StringMapper()).
            table().read(configuration.stringTable());
View Full Code Here

      return stringBuilder.create();
   }

   private JdbcBinaryStoreConfiguration buildBinaryStoreConfiguration(JdbcMixedStoreConfiguration configuration) {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      JdbcBinaryStoreConfigurationBuilder binaryBuilder = builder.persistence().addStore
            (JdbcBinaryStoreConfigurationBuilder.class).manageConnectionFactory(false);
      binaryBuilder.table().read(configuration.binaryTable());
      return binaryBuilder.create();
   }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.