use of org.infinispan.factories.annotations.Start in project infinispan by infinispan.
the class AbstractMetricsRegistration method start.
@Start
protected void start() {
if (metricsEnabled()) {
namePrefix = initNamePrefix();
metricIds = Collections.synchronizedSet(new HashSet<>());
try {
processComponents();
} catch (Exception e) {
throw new CacheException("A failure occurred while registering metrics.", e);
}
}
}
use of org.infinispan.factories.annotations.Start in project infinispan by infinispan.
the class SerializationContextRegistryImpl method start.
@Start
public void start() {
user.addContextInitializer(new CommonTypesSchema());
user.addContextInitializer(new CommonContainerTypesSchema());
user.addContextInitializer(new UserContextInitializerImpl());
// Add user configured SCIs
Collection<SerializationContextInitializer> initializers = globalConfig.serialization().contextInitializers();
if (initializers == null || initializers.isEmpty()) {
// If no SCIs have been explicitly configured, then load all available SCI services
initializers = ServiceFinder.load(SerializationContextInitializer.class, globalConfig.classLoader());
}
initializers.forEach(user::addContextInitializer);
String messageName = PersistenceContextInitializer.getFqTypeName(MarshallableUserObject.class);
BaseMarshaller userObjectMarshaller = new MarshallableUserObject.Marshaller(messageName, userMarshaller.wired());
update(GLOBAL, ctx -> ctx.addContextInitializer(new PersistenceContextInitializerImpl()).addContextInitializer(new org.infinispan.commons.GlobalContextInitializerImpl()).addMarshaller(userObjectMarshaller));
update(PERSISTENCE, ctx -> ctx.addContextInitializer(new PersistenceContextInitializerImpl()).addMarshaller(userObjectMarshaller));
}
use of org.infinispan.factories.annotations.Start in project infinispan by infinispan.
the class DefaultIracTombstoneManager method start.
@Start
public void start() {
Transport transport = rpcManager.getTransport();
transport.checkCrossSiteAvailable();
String localSiteName = transport.localSiteName();
asyncBackups.removeIf(xSiteBackup -> localSiteName.equals(xSiteBackup.getSiteName()));
iracExecutor.setBackOff(ExponentialBackOff.NO_OP);
iracExecutor.setExecutor(blockingExecutor);
stopped = false;
scheduler.disabled = false;
scheduler.scheduleWithCurrentDelay();
}
use of org.infinispan.factories.annotations.Start in project infinispan by infinispan.
the class DefaultConflictManager method start.
@Start
public void start() {
this.localAddress = rpcManager.getAddress();
PartitionHandlingConfiguration config = cacheConfiguration.clustering().partitionHandling();
this.entryMergePolicy = mergePolicyRegistry.createInstance(config);
// TODO make this an explicit configuration param in PartitionHandlingConfiguration
this.conflictTimeout = cacheConfiguration.clustering().stateTransfer().timeout();
// Limit the number of concurrent tasks to ensure that internal CR operations can never overlap
this.resolutionExecutor = blockingManager.limitedBlockingExecutor("ConflictManager-" + cacheName, 1);
this.running = true;
if (log.isTraceEnabled())
log.tracef("Cache %s starting %s. isRunning=%s", cacheName, getClass().getSimpleName(), !running);
}
use of org.infinispan.factories.annotations.Start in project infinispan by infinispan.
the class ClusterPublisherManagerImpl method start.
@Start
public void start() {
maxSegment = cacheConfiguration.clustering().hash().numSegments();
writeBehindShared = hasWriteBehindSharedStore(cacheConfiguration.persistence());
persistenceManager.addStoreListener(storeChangeListener);
// Note we use a little extra wiggle room for the timeout of the remote invocation by increasing it by 3 times
// normal. This is due to our responses requiring additional processing time (iteration serialization and normally
// increased payloads)
rpcOptions = new RpcOptions(DeliverOrder.NONE, cacheConfiguration.clustering().remoteTimeout() * 3, TimeUnit.MILLISECONDS);
cacheConfiguration.clustering().attributes().attribute(ClusteringConfiguration.REMOTE_TIMEOUT).addListener((a, ignored) -> {
rpcOptions = new RpcOptions(DeliverOrder.NONE, a.get() * 3, TimeUnit.MILLISECONDS);
});
}
Aggregations