Tabnine Logo
ConfigurableBeanFactory.getSingletonMutex
Code IndexAdd Tabnine to your IDE (free)

How to use
getSingletonMutex
method
in
org.springframework.beans.factory.config.ConfigurableBeanFactory

Best Java code snippets using org.springframework.beans.factory.config.ConfigurableBeanFactory.getSingletonMutex (Showing top 14 results out of 315)

origin: spring-projects/spring-framework

/**
 * A {@link BeanFactory} only needs to be available in conjunction with
 * {@link #setContainerFactoryBeanName}.
 */
@Override
public void setBeanFactory(BeanFactory beanFactory) {
  this.beanFactory = beanFactory;
  if (beanFactory instanceof ConfigurableBeanFactory) {
    this.mutex = ((ConfigurableBeanFactory) beanFactory).getSingletonMutex();
  }
}
origin: spring-projects/spring-framework

private void resetAdviceMonitor() {
  if (this.beanFactory instanceof ConfigurableBeanFactory) {
    this.adviceMonitor = ((ConfigurableBeanFactory) this.beanFactory).getSingletonMutex();
  }
  else {
    this.adviceMonitor = new Object();
  }
}
origin: spring-projects/spring-framework

@Override
public void setBeanFactory(BeanFactory beanFactory) {
  this.beanFactory = beanFactory;
  if (beanFactory instanceof ConfigurableBeanFactory) {
    ConfigurableBeanFactory cbf = (ConfigurableBeanFactory) beanFactory;
    if (this.beanClassLoader == null) {
      this.beanClassLoader = cbf.getBeanClassLoader();
    }
    this.retrievalMutex = cbf.getSingletonMutex();
  }
}
origin: spring-projects/spring-framework

@Override
@Nullable
public Object getAspectCreationMutex() {
  if (this.beanFactory.isSingleton(this.name)) {
    // Rely on singleton semantics provided by the factory -> no local lock.
    return null;
  }
  else if (this.beanFactory instanceof ConfigurableBeanFactory) {
    // No singleton guarantees from the factory -> let's lock locally but
    // reuse the factory's singleton lock, just in case a lazy dependency
    // of our advice bean happens to trigger the singleton lock implicitly...
    return ((ConfigurableBeanFactory) this.beanFactory).getSingletonMutex();
  }
  else {
    return this;
  }
}
origin: org.springframework/spring-context

@Override
public void setBeanFactory(BeanFactory beanFactory) {
  this.beanFactory = beanFactory;
  if (beanFactory instanceof ConfigurableBeanFactory) {
    ConfigurableBeanFactory cbf = (ConfigurableBeanFactory) beanFactory;
    if (this.beanClassLoader == null) {
      this.beanClassLoader = cbf.getBeanClassLoader();
    }
    this.retrievalMutex = cbf.getSingletonMutex();
  }
}
origin: com.microsoft.azure/spring-cloud-azure-messaging

/**
 * A {@link BeanFactory} only needs to be available in conjunction with
 * {@link #setContainerFactoryBeanName}.
 */
@Override
public void setBeanFactory(BeanFactory beanFactory) {
  this.beanFactory = beanFactory;
  if (beanFactory instanceof ConfigurableBeanFactory) {
    this.mutex = ((ConfigurableBeanFactory) beanFactory).getSingletonMutex();
  }
}
origin: Microsoft/spring-cloud-azure

/**
 * A {@link BeanFactory} only needs to be available in conjunction with
 * {@link #setContainerFactoryBeanName}.
 */
@Override
public void setBeanFactory(BeanFactory beanFactory) {
  this.beanFactory = beanFactory;
  if (beanFactory instanceof ConfigurableBeanFactory) {
    this.mutex = ((ConfigurableBeanFactory) beanFactory).getSingletonMutex();
  }
}
origin: apache/servicemix-bundles

/**
 * A {@link BeanFactory} only needs to be available in conjunction with
 * {@link #setContainerFactoryBeanName}.
 */
@Override
public void setBeanFactory(BeanFactory beanFactory) {
  this.beanFactory = beanFactory;
  if (beanFactory instanceof ConfigurableBeanFactory) {
    this.mutex = ((ConfigurableBeanFactory) beanFactory).getSingletonMutex();
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms

/**
 * A {@link BeanFactory} only needs to be available in conjunction with
 * {@link #setContainerFactoryBeanName}.
 */
@Override
public void setBeanFactory(BeanFactory beanFactory) {
  this.beanFactory = beanFactory;
  if (beanFactory instanceof ConfigurableBeanFactory) {
    this.mutex = ((ConfigurableBeanFactory) beanFactory).getSingletonMutex();
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop

private void resetAdviceMonitor() {
  if (this.beanFactory instanceof ConfigurableBeanFactory) {
    this.adviceMonitor = ((ConfigurableBeanFactory) this.beanFactory).getSingletonMutex();
  }
  else {
    this.adviceMonitor = new Object();
  }
}
origin: apache/servicemix-bundles

private void resetAdviceMonitor() {
  if (this.beanFactory instanceof ConfigurableBeanFactory) {
    this.adviceMonitor = ((ConfigurableBeanFactory) this.beanFactory).getSingletonMutex();
  }
  else {
    this.adviceMonitor = new Object();
  }
}
origin: apache/servicemix-bundles

@Override
public void setBeanFactory(BeanFactory beanFactory) {
  this.beanFactory = beanFactory;
  if (beanFactory instanceof ConfigurableBeanFactory) {
    ConfigurableBeanFactory cbf = (ConfigurableBeanFactory) beanFactory;
    if (this.beanClassLoader == null) {
      this.beanClassLoader = cbf.getBeanClassLoader();
    }
    this.retrievalMutex = cbf.getSingletonMutex();
  }
}
origin: apache/servicemix-bundles

@Override
public Object getAspectCreationMutex() {
  if (this.beanFactory != null) {
    if (this.beanFactory.isSingleton(name)) {
      // Rely on singleton semantics provided by the factory -> no local lock.
      return null;
    }
    else if (this.beanFactory instanceof ConfigurableBeanFactory) {
      // No singleton guarantees from the factory -> let's lock locally but
      // reuse the factory's singleton lock, just in case a lazy dependency
      // of our advice bean happens to trigger the singleton lock implicitly...
      return ((ConfigurableBeanFactory) this.beanFactory).getSingletonMutex();
    }
  }
  return this;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop

@Override
@Nullable
public Object getAspectCreationMutex() {
  if (this.beanFactory.isSingleton(this.name)) {
    // Rely on singleton semantics provided by the factory -> no local lock.
    return null;
  }
  else if (this.beanFactory instanceof ConfigurableBeanFactory) {
    // No singleton guarantees from the factory -> let's lock locally but
    // reuse the factory's singleton lock, just in case a lazy dependency
    // of our advice bean happens to trigger the singleton lock implicitly...
    return ((ConfigurableBeanFactory) this.beanFactory).getSingletonMutex();
  }
  else {
    return this;
  }
}
org.springframework.beans.factory.configConfigurableBeanFactorygetSingletonMutex

Popular methods of ConfigurableBeanFactory

  • resolveEmbeddedValue
    Resolve the given embedded value, e.g. an annotation attribute.
  • getBeanExpressionResolver
    Return the resolution strategy for expressions in bean definition values.
  • getBean
  • registerSingleton
    Register the given existing object as singleton in the bean factory, under the given bean name.The g
  • getTypeConverter
    Obtain a type converter as used by this BeanFactory. This may be a fresh instance for each call, sin
  • getBeanClassLoader
    Return this factory's class loader for loading bean classes (only null if even the system ClassLoade
  • containsBean
  • getConversionService
    Return the associated ConversionService, if any.
  • getMergedBeanDefinition
    Return a merged BeanDefinition for the given bean name, merging a child bean definition with its par
  • isCurrentlyInCreation
    Determine whether the specified bean is currently in creation.
  • destroySingletons
    Destroy all cached singletons in this factory. To be called on shutdown of a factory.
  • getSingletonNames
  • destroySingletons,
  • getSingletonNames,
  • registerDependentBean,
  • containsSingleton,
  • destroyBean,
  • isFactoryBean,
  • isSingleton,
  • registerAlias,
  • addBeanPostProcessor

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • compareTo (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ImageIO (javax.imageio)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now