@Override public void init(InitializationContext ctx) { this.ctx = ctx; HotRodStoreConfiguration configuration = ctx.getConfiguration(); RemoteCacheContainer remoteCacheContainer = configuration.attributes().attribute(HotRodStoreConfiguration.REMOTE_CACHE_CONTAINER).get(); String cacheConfiguration = configuration.attributes().attribute(HotRodStoreConfiguration.CACHE_CONFIGURATION).get(); String cacheName = ctx.getCache().getName(); try { ProtocolVersion protocolVersion = remoteCacheContainer.getConfiguration().version(); // Administration support was introduced in protocol version 2.7 if (protocolVersion.compareTo(ProtocolVersion.PROTOCOL_VERSION_27) < 0) { this.remoteCache = remoteCacheContainer.getCache(cacheName, false); if (this.remoteCache == null) { throw InfinispanLogger.ROOT_LOGGER.remoteCacheMustBeDefined(protocolVersion.toString(), cacheName); } } else { InfinispanLogger.ROOT_LOGGER.remoteCacheCreated(cacheName, cacheConfiguration); this.remoteCache = remoteCacheContainer.administration().getOrCreateCache(cacheName, cacheConfiguration); } } catch (HotRodClientException ex) { throw new PersistenceException(ex); } }
@Override public void init(InitializationContext initializationContext) { configuration = initializationContext.getConfiguration(); ctx = initializationContext; }
@Override public void init(InitializationContext ctx) { this.config = ctx.getConfiguration(); }
@Override public void init(InitializationContext ctx) { this.ctx = ctx; configuration = ctx.getConfiguration(); tableName = configuration.tableName(); List<String> auths = configuration.auths(); if (auths != null && !auths.isEmpty()) authorizations = new Authorizations(auths.toArray(new String[auths.size()])); }
@Override public void init(InitializationContext ctx) { this.ctx = ctx; this.configuration = ctx.getConfiguration(); this.fileRoot = this.configuration.location(); this.autoChunkSize = this.configuration.autoChunkSize(); }
@Override public void init(InitializationContext ctx) { this.configuration = ctx.getConfiguration(); this.ctx = ctx; this.scheduler = Schedulers.from(ctx.getExecutor()); this.timeService = ctx.getTimeService(); this.semaphore = new Semaphore(Integer.MAX_VALUE, true); }
@Override public void init(InitializationContext ctx) { this.ctx = ctx; LuceneLoaderConfiguration configuration = ctx.getConfiguration(); this.fileRoot = configuration.location(); this.autoChunkSize = configuration.autoChunkSize(); this.affinitySegmentId = configuration.affinitySegmentId(); }
@Override public void init(InitializationContext ctx) { this.ctx = ctx; LuceneLoaderConfiguration configuration = ctx.getConfiguration(); this.fileRoot = configuration.location(); this.autoChunkSize = configuration.autoChunkSize(); this.affinitySegmentId = configuration.affinitySegmentId(); }
@Override @SuppressWarnings("unchecked") public void init(final InitializationContext ctx) { // This method will be invoked by the PersistenceManager during initialization. The InitializationContext // contains: // - this CacheLoader's configuration // - the cache to which this loader is applied. Your loader might want to use the cache's name to construct // cache-specific identifiers // - the StreamingMarshaller that needs to be used to marshall/unmarshall the entries // - a TimeService which the loader can use to determine expired entries // - a ByteBufferFactory which needs to be used to construct ByteBuffers // - a MarshalledEntryFactory which needs to be used to construct entries from the data retrieved by the loader super.init(ctx); this.config = ctx.getConfiguration(); Loggers.MAIN_LOG.info("[IL0201] LDAP store configuration properties for cache {}:", getCacheName()); config.log(); Loggers.MAIN_LOG.debug("[IL0202] Loading LDAP entry transformer class {} for cache {}...", config.ldapDirectory.entryTransformer, getCacheName()); ldapEntryTransformer = loadEntryTransformerClass(config.ldapDirectory.entryTransformer); marshalledEntryFactory = (MarshalledEntryFactory<K, V>)ctx.getMarshalledEntryFactory(); Loggers.MAIN_LOG.info("[IL0203] Initialized LDAP external store for cache {}", getCacheName()); }
@Override @SuppressWarnings("unchecked") public void init(final InitializationContext ctx) { // This method will be invoked by the PersistenceManager during initialization. The InitializationContext // contains: // - this CacheLoader's configuration // - the cache to which this loader is applied. Your loader might want to use the cache's name to construct // cache-specific identifiers // - the StreamingMarshaller that needs to be used to marshall/unmarshall the entries // - a TimeService which the loader can use to determine expired entries // - a ByteBufferFactory which needs to be used to construct ByteBuffers // - a MarshalledEntryFactory which needs to be used to construct entries from the data retrieved by the loader super.init(ctx); this.config = ctx.getConfiguration(); Loggers.MAIN_LOG.info("[IL0201] LDAP store configuration properties for cache {}:", getCacheName()); config.log(); Loggers.MAIN_LOG.debug("[IL0202] Loading LDAP entry transformer class {} for cache {}...", config.ldapDirectory.entryTransformer, getCacheName()); ldapEntryTransformer = loadEntryTransformerClass(config.ldapDirectory.entryTransformer); marshalledEntryFactory = (MarshalledEntryFactory<K, V>)ctx.getMarshalledEntryFactory(); Loggers.MAIN_LOG.info("[IL0203] Initialized LDAP external store for cache {}", getCacheName()); }
@Override public void init(InitializationContext ctx) { configuration = ctx.getConfiguration(); marshaller = ctx.getMarshaller(); marshalledEntryFactory = ctx.getMarshalledEntryFactory(); byteBufferFactory = ctx.getByteBufferFactory(); timeService = ctx.getTimeService(); maxKeyLength = configuration.maxNodeSize() - IndexNode.RESERVED_SPACE; }
@Override public void init(InitializationContext ctx) { this.ctx = ctx; this.configuration = ctx.getConfiguration(); this.cache = ctx.getCache(); this.marshaller = ctx.getMarshaller(); this.storeName = makeStoreName(configuration, cache); this.initCount.incrementAndGet(); this.timeService = ctx.getTimeService(); }
this.config = ctx.getConfiguration();
@Override public void init(InitializationContext ctx) { this.configuration = ctx.getConfiguration(); this.emfRegistry = ctx.getCache().getAdvancedCache().getComponentRegistry().getGlobalComponentRegistry().getComponent(EntityManagerFactoryRegistry.class); this.marshallerEntryFactory = ctx.getMarshalledEntryFactory(); this.marshaller = ctx.getMarshaller(); this.timeService = ctx.getTimeService(); this.executorService = ctx.getExecutor(); }
this.config = ctx.getConfiguration();
@Override public void init(InitializationContext ctx) { this.configuration = ctx.getConfiguration(); this.cacheName = ctx.getCache().getName(); this.globalConfiguration = ctx.getCache().getCacheManager().getCacheManagerConfiguration(); this.marshalledEntryFactory = ctx.getMarshalledEntryFactory(); this.marshaller = ctx.getMarshaller(); this.timeService = ctx.getTimeService(); this.keyPartitioner = configuration.segmented() ? ctx.getKeyPartitioner() : null; this.isDistributedCache = ctx.getCache().getCacheConfiguration() != null && ctx.getCache().getCacheConfiguration().clustering().cacheMode().isDistributed(); }
this.config = ctx.getConfiguration();
@Override public void init(InitializationContext ctx) { this.ctx = ctx; HotRodStoreConfiguration configuration = ctx.getConfiguration(); RemoteCacheContainer remoteCacheContainer = configuration.attributes().attribute(HotRodStoreConfiguration.REMOTE_CACHE_CONTAINER).get(); String cacheConfiguration = configuration.attributes().attribute(HotRodStoreConfiguration.CACHE_CONFIGURATION).get(); String cacheName = ctx.getCache().getName(); try { ProtocolVersion protocolVersion = remoteCacheContainer.getConfiguration().version(); // Administration support was introduced in protocol version 2.7 if (protocolVersion.compareTo(ProtocolVersion.PROTOCOL_VERSION_27) < 0) { this.remoteCache = remoteCacheContainer.getCache(cacheName, false); if (this.remoteCache == null) { throw InfinispanLogger.ROOT_LOGGER.remoteCacheMustBeDefined(protocolVersion.toString(), cacheName); } } else { InfinispanLogger.ROOT_LOGGER.remoteCacheCreated(cacheName, cacheConfiguration); this.remoteCache = remoteCacheContainer.administration().getOrCreateCache(cacheName, cacheConfiguration); } } catch (HotRodClientException ex) { throw new PersistenceException(ex); } }