Package org.infinispan.loaders.jdbc.mixed

Examples of org.infinispan.loaders.jdbc.mixed.JdbcMixedCacheStoreConfig


      return stringTable;
   }

   @Override
   public JdbcMixedCacheStoreConfig adapt() {
      JdbcMixedCacheStoreConfig config = new JdbcMixedCacheStoreConfig();

      // StoreConfiguration
      config.fetchPersistentState(fetchPersistentState());
      config.ignoreModifications(ignoreModifications());
      config.purgeOnStartup(purgeOnStartup());
      config.purgeSynchronously(purgeSynchronously());
      config.purgerThreads(purgerThreads());

      // LockSupportCacheStoreConfiguration
      config.setLockAcquistionTimeout(lockAcquistionTimeout());
      config.setLockConcurrencyLevel(lockConcurrencyLevel());

      // AbstractJdbcCacheStoreConfiguration
      config.setConnectionFactoryClass(connectionFactoryClass());
      config.setConnectionUrl(connectionUrl());
      config.setDatasourceJndiLocation(datasource());
      config.setDriverClass(driverClass());
      config.setUserName(userName());
      config.setPassword(password());

      // JdbcStringBasedCacheStoreConfiguration
      config.setKey2StringMapperClass(key2StringMapper);

      // TableManipulation
      config.setCreateTableOnStartForBinary(binaryTable().createOnStart());
      config.setDropTableOnExitForBinary(binaryTable().dropOnExit());
      config.setTableNamePrefixForBinary(binaryTable().tableNamePrefix());
      config.setDataColumnNameForBinary(binaryTable().dataColumnName());
      config.setDataColumnTypeForBinary(binaryTable().dataColumnType());
      config.setIdColumnNameForBinary(binaryTable().idColumnName());
      config.setIdColumnTypeForBinary(binaryTable().idColumnType());
      config.setTimestampColumnNameForBinary(binaryTable().timestampColumnName());
      config.setTimestampColumnTypeForBinary(binaryTable().timestampColumnType());

      config.setCreateTableOnStartForStrings(stringTable().createOnStart());
      config.setDropTableOnExitForStrings(stringTable().dropOnExit());
      config.setTableNamePrefixForStrings(stringTable().tableNamePrefix());
      config.setDataColumnNameForStrings(stringTable().dataColumnName());
      config.setDataColumnTypeForStrings(stringTable().dataColumnType());
      config.setIdColumnNameForStrings(stringTable().idColumnName());
      config.setIdColumnTypeForStrings(stringTable().idColumnType());
      config.setTimestampColumnNameForStrings(stringTable().timestampColumnName());
      config.setTimestampColumnTypeForStrings(stringTable().timestampColumnType());

      return config;
   }
View Full Code Here


      return databaseType;
   }

   @Override
   public JdbcMixedCacheStoreConfig adapt() {
      JdbcMixedCacheStoreConfig config = new JdbcMixedCacheStoreConfig();

      // StoreConfiguration
      LegacyConfigurationAdaptor.adapt(this, config);

      // ConnectionFactory
      ((LegacyConnectionFactoryAdaptor) connectionFactory()).adapt(config);

      // JdbcStringBasedCacheStoreConfiguration
      config.setKey2StringMapperClass(key2StringMapper);

      // TableManipulation
      config.setCreateTableOnStartForBinary(binaryTable().createOnStart());
      config.setDropTableOnExitForBinary(binaryTable().dropOnExit());
      config.setTableNamePrefixForBinary(binaryTable().tableNamePrefix());
      config.setDataColumnNameForBinary(binaryTable().dataColumnName());
      config.setDataColumnTypeForBinary(binaryTable().dataColumnType());
      config.setIdColumnNameForBinary(binaryTable().idColumnName());
      config.setIdColumnTypeForBinary(binaryTable().idColumnType());
      config.setTimestampColumnNameForBinary(binaryTable().timestampColumnName());
      config.setTimestampColumnTypeForBinary(binaryTable().timestampColumnType());

      config.setCreateTableOnStartForStrings(stringTable().createOnStart());
      config.setDropTableOnExitForStrings(stringTable().dropOnExit());
      config.setTableNamePrefixForStrings(stringTable().tableNamePrefix());
      config.setDataColumnNameForStrings(stringTable().dataColumnName());
      config.setDataColumnTypeForStrings(stringTable().dataColumnType());
      config.setIdColumnNameForStrings(stringTable().idColumnName());
      config.setIdColumnTypeForStrings(stringTable().idColumnType());
      config.setTimestampColumnNameForStrings(stringTable().timestampColumnName());
      config.setTimestampColumnTypeForStrings(stringTable().timestampColumnType());

      // Global TableManipulation settings
      config.setBatchSize(batchSize);
      config.setFetchSize(fetchSize);
      config.setDatabaseType(databaseType);

      return config;
   }
View Full Code Here

      return stringTable;
   }

   @Override
   public JdbcMixedCacheStoreConfig adapt() {
      JdbcMixedCacheStoreConfig config = new JdbcMixedCacheStoreConfig();

      // StoreConfiguration
      LegacyConfigurationAdaptor.adapt(this, config);

      // AbstractJdbcCacheStoreConfiguration
      config.setConnectionFactoryClass(connectionFactoryClass());
      config.setConnectionUrl(connectionUrl());
      config.setDatasourceJndiLocation(datasource());
      config.setDriverClass(driverClass());
      config.setUserName(userName());
      config.setPassword(password());

      // JdbcStringBasedCacheStoreConfiguration
      config.setKey2StringMapperClass(key2StringMapper);

      // TableManipulation
      config.setCreateTableOnStartForBinary(binaryTable().createOnStart());
      config.setDropTableOnExitForBinary(binaryTable().dropOnExit());
      config.setTableNamePrefixForBinary(binaryTable().tableNamePrefix());
      config.setDataColumnNameForBinary(binaryTable().dataColumnName());
      config.setDataColumnTypeForBinary(binaryTable().dataColumnType());
      config.setIdColumnNameForBinary(binaryTable().idColumnName());
      config.setIdColumnTypeForBinary(binaryTable().idColumnType());
      config.setTimestampColumnNameForBinary(binaryTable().timestampColumnName());
      config.setTimestampColumnTypeForBinary(binaryTable().timestampColumnType());

      config.setCreateTableOnStartForStrings(stringTable().createOnStart());
      config.setDropTableOnExitForStrings(stringTable().dropOnExit());
      config.setTableNamePrefixForStrings(stringTable().tableNamePrefix());
      config.setDataColumnNameForStrings(stringTable().dataColumnName());
      config.setDataColumnTypeForStrings(stringTable().dataColumnType());
      config.setIdColumnNameForStrings(stringTable().idColumnName());
      config.setIdColumnTypeForStrings(stringTable().idColumnType());
      config.setTimestampColumnNameForStrings(stringTable().timestampColumnName());
      config.setTimestampColumnTypeForStrings(stringTable().timestampColumnType());

      return config;
   }
View Full Code Here

      return databaseType;
   }

   @Override
   public JdbcMixedCacheStoreConfig adapt() {
      JdbcMixedCacheStoreConfig config = new JdbcMixedCacheStoreConfig();

      // StoreConfiguration
      LegacyConfigurationAdaptor.adapt(this, config);

      // ConnectionFactory
      ((LegacyConnectionFactoryAdaptor) connectionFactory()).adapt(config);

      // JdbcStringBasedCacheStoreConfiguration
      config.setKey2StringMapperClass(key2StringMapper);

      // TableManipulation
      config.setCreateTableOnStartForBinary(binaryTable().createOnStart());
      config.setDropTableOnExitForBinary(binaryTable().dropOnExit());
      config.setTableNamePrefixForBinary(binaryTable().tableNamePrefix());
      config.setDataColumnNameForBinary(binaryTable().dataColumnName());
      config.setDataColumnTypeForBinary(binaryTable().dataColumnType());
      config.setIdColumnNameForBinary(binaryTable().idColumnName());
      config.setIdColumnTypeForBinary(binaryTable().idColumnType());
      config.setTimestampColumnNameForBinary(binaryTable().timestampColumnName());
      config.setTimestampColumnTypeForBinary(binaryTable().timestampColumnType());

      config.setCreateTableOnStartForStrings(stringTable().createOnStart());
      config.setDropTableOnExitForStrings(stringTable().dropOnExit());
      config.setTableNamePrefixForStrings(stringTable().tableNamePrefix());
      config.setDataColumnNameForStrings(stringTable().dataColumnName());
      config.setDataColumnTypeForStrings(stringTable().dataColumnType());
      config.setIdColumnNameForStrings(stringTable().idColumnName());
      config.setIdColumnTypeForStrings(stringTable().idColumnType());
      config.setTimestampColumnNameForStrings(stringTable().timestampColumnName());
      config.setTimestampColumnTypeForStrings(stringTable().timestampColumnType());

      // Global TableManipulation settings
      config.setBatchSize(batchSize);
      config.setFetchSize(fetchSize);
      config.setDatabaseType(databaseType);

      return config;
   }
View Full Code Here

            JdbcBinaryCacheStoreConfig storeConfig = new JdbcBinaryCacheStoreConfig();
            storeConfig.setTableManipulation(this.buildBucketTableManipulation(store.get(ModelKeys.BUCKET_TABLE)));
            return storeConfig;
        }
        // Else, use mixed mode
        JdbcMixedCacheStoreConfig storeConfig = new JdbcMixedCacheStoreConfig();
        storeConfig.setStringsTableManipulation(this.buildEntryTableManipulation(store.get(ModelKeys.ENTRY_TABLE)));
        storeConfig.setBinaryTableManipulation(this.buildBucketTableManipulation(store.get(ModelKeys.BUCKET_TABLE)));
        return storeConfig;
    }
View Full Code Here

      return stringTable;
   }

   @Override
   public JdbcMixedCacheStoreConfig adapt() {
      JdbcMixedCacheStoreConfig config = new JdbcMixedCacheStoreConfig();

      // StoreConfiguration
      LegacyConfigurationAdaptor.adapt(this, config);

      // ConnectionFactory
      ((LegacyConnectionFactoryAdaptor) connectionFactory()).adapt(config);

      // JdbcStringBasedCacheStoreConfiguration
      config.setKey2StringMapperClass(key2StringMapper);

      // TableManipulation
      config.setCreateTableOnStartForBinary(binaryTable().createOnStart());
      config.setDropTableOnExitForBinary(binaryTable().dropOnExit());
      config.setTableNamePrefixForBinary(binaryTable().tableNamePrefix());
      config.setDataColumnNameForBinary(binaryTable().dataColumnName());
      config.setDataColumnTypeForBinary(binaryTable().dataColumnType());
      config.setIdColumnNameForBinary(binaryTable().idColumnName());
      config.setIdColumnTypeForBinary(binaryTable().idColumnType());
      config.setTimestampColumnNameForBinary(binaryTable().timestampColumnName());
      config.setTimestampColumnTypeForBinary(binaryTable().timestampColumnType());

      config.setCreateTableOnStartForStrings(stringTable().createOnStart());
      config.setDropTableOnExitForStrings(stringTable().dropOnExit());
      config.setTableNamePrefixForStrings(stringTable().tableNamePrefix());
      config.setDataColumnNameForStrings(stringTable().dataColumnName());
      config.setDataColumnTypeForStrings(stringTable().dataColumnType());
      config.setIdColumnNameForStrings(stringTable().idColumnName());
      config.setIdColumnTypeForStrings(stringTable().idColumnType());
      config.setTimestampColumnNameForStrings(stringTable().timestampColumnName());
      config.setTimestampColumnTypeForStrings(stringTable().timestampColumnType());

      return config;
   }
View Full Code Here

      assert store2.stringTable().timestampColumnType().equals("BIGINT");
      assert store2.fetchPersistentState();
      assert store2.lockConcurrencyLevel() == 32;
      assert store2.async().enabled();

      JdbcMixedCacheStoreConfig legacy = store.adapt();
      assert legacy.getConnectionFactoryConfig().getConnectionUrl().equals(JDBC_URL);
      assert legacy.isFetchPersistentState();
      assert legacy.getLockConcurrencyLevel() == 32;
      assert legacy.getAsyncStoreConfig().isEnabled();
   }
View Full Code Here

            JdbcBinaryCacheStoreConfig storeConfig = new JdbcBinaryCacheStoreConfig();
            storeConfig.setTableManipulation(this.buildBucketTableManipulation(store.get(ModelKeys.BUCKET_TABLE)));
            return storeConfig;
        }
        // Else, use mixed mode
        JdbcMixedCacheStoreConfig storeConfig = new JdbcMixedCacheStoreConfig();
        storeConfig.setStringsTableManipulation(this.buildEntryTableManipulation(store.get(ModelKeys.ENTRY_TABLE)));
        storeConfig.setBinaryTableManipulation(this.buildBucketTableManipulation(store.get(ModelKeys.BUCKET_TABLE)));
        return storeConfig;
    }
View Full Code Here

TOP

Related Classes of org.infinispan.loaders.jdbc.mixed.JdbcMixedCacheStoreConfig

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.