Spring Data for VMware GemFire
Class AbstractFactoryBeanSupport<T>
java.lang.Object
org.springframework.data.gemfire.support.AbstractFactoryBeanSupport<T>
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.FactoryBean<T>
- Direct Known Subclasses:
AbstractBasicCacheFactoryBean,AbstractWANComponentFactoryBean,CacheServerFactoryBean,DiskStoreFactoryBean,GemfireFunctionProxyFactoryBean,IndexFactoryBean,LocatorFactoryBean,PartitionAttributesFactoryBean,PoolFactoryBean,ResolvableRegionFactoryBean,SmartCacheResolverFactoryBean,SnapshotServiceFactoryBean
public abstract class AbstractFactoryBeanSupport<T>
extends Object
implements org.springframework.beans.factory.FactoryBean<T>, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware
An abstract Spring
FactoryBean base class implementation encapsulating operations common to all
Spring Data for Apache Geode (SDG) FactoryBean implementations.- Since:
- 1.0.0
- See Also:
-
LoggerLoggerFactoryBeanClassLoaderAwareBeanFactoryBeanFactoryAwareBeanNameAwareFactoryBean
-
Field Summary
FieldsFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs a new instance ofAbstractFactoryBeanSupportinitializing aLoggerto log operations performed by thisFactoryBean. -
Method Summary
Modifier and TypeMethodDescriptionReturns a reference to theClassLoaderused by the Spring container to load beanclasses.org.springframework.beans.factory.BeanFactoryReturns a reference to the SpringBeanFactoryin which thisFactoryBeanwas declared.Returns thebean nameassigned to thisFactoryBeanas declared in the Spring container.protected org.slf4j.Loggerprotected Optional<org.slf4j.Logger>booleanDetermines whether DEBUG logging is enabled.booleanDetermines whether ERROR logging is enabled.booleanDetermines whether INFO logging is enabled.booleanIndicates that thisFactoryBeanproduces a single bean instance.booleanDetermines whether WARN logging is enabled.protected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidlogWarning(String message, Object... args) protected voidlogWarning(Supplier<String> message) protected org.slf4j.LoggerConstructs a new instance ofLoggerto log statements printed by Spring Data for Apache Geode.voidsetBeanClassLoader(ClassLoader classLoader) Sets a reference to theClassLoaderused by the Spring container to load beanclasses.voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) Sets a reference to the SpringBeanFactoryin which thisFactoryBeanwas declared.voidsetBeanName(String name) Sets thebean nameassigned to thisFactoryBeanas declared in the Spring container.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBean
getObject, getObjectType
-
Field Details
-
DEFAULT_SINGLETON
protected static final boolean DEFAULT_SINGLETON- See Also:
-
-
Constructor Details
-
AbstractFactoryBeanSupport
protected AbstractFactoryBeanSupport()Constructs a new instance ofAbstractFactoryBeanSupportinitializing aLoggerto log operations performed by thisFactoryBean.- See Also:
-
-
Method Details
-
newLogger
@NonNull protected org.slf4j.Logger newLogger()Constructs a new instance ofLoggerto log statements printed by Spring Data for Apache Geode.- Returns:
- a new instance of SLF4J
Logger. - See Also:
-
LogFactory.getLog(Class)Log
-
setBeanClassLoader
Sets a reference to theClassLoaderused by the Spring container to load beanclasses.- Specified by:
setBeanClassLoaderin interfaceorg.springframework.beans.factory.BeanClassLoaderAware- Parameters:
classLoader-ClassLoaderused by the Spring container to load beanclasses.- See Also:
-
BeanClassLoaderAware.setBeanClassLoader(ClassLoader)ClassLoaderClass
-
getBeanClassLoader
Returns a reference to theClassLoaderused by the Spring container to load beanclasses.- Returns:
- the
ClassLoaderused by the Spring container to load beanclasses. - See Also:
-
BeanClassLoaderAware.setBeanClassLoader(ClassLoader)ClassLoaderClass
-
setBeanFactory
public void setBeanFactory(@Nullable org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException Sets a reference to the SpringBeanFactoryin which thisFactoryBeanwas declared.- Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Parameters:
beanFactory- reference to the declaring SpringBeanFactory.- Throws:
org.springframework.beans.BeansException- See Also:
-
BeanFactoryAware.setBeanFactory(BeanFactory)BeanFactory
-
getBeanFactory
@Nullable public org.springframework.beans.factory.BeanFactory getBeanFactory()Returns a reference to the SpringBeanFactoryin which thisFactoryBeanwas declared.- Returns:
- a reference to the declaring Spring
BeanFactory. - See Also:
-
BeanFactoryAware.setBeanFactory(BeanFactory)BeanFactory
-
setBeanName
Sets thebean nameassigned to thisFactoryBeanas declared in the Spring container. -
getBeanName
Returns thebean nameassigned to thisFactoryBeanas declared in the Spring container. -
getLogger
@NonNull protected org.slf4j.Logger getLogger()- Returns:
- a reference to the
Loggerused by thisFactoryBeanto logmessages. - See Also:
-
Log
-
getOptionalLogger
- Returns:
- an
Optionalreference to theLoggerused by thisFactoryBeanto logmessages. - See Also:
-
OptionalLoggergetLogger()
-
isDebugLoggingEnabled
public boolean isDebugLoggingEnabled()Determines whether DEBUG logging is enabled.- Returns:
- a boolean value indicating whether DEBUG logging is enabled.
- See Also:
-
Logger.isDebugEnabled()getOptionalLogger()
-
isInfoLoggingEnabled
public boolean isInfoLoggingEnabled()Determines whether INFO logging is enabled.- Returns:
- a boolean value indicating whether INFO logging is enabled.
- See Also:
-
Logger.isInfoEnabled()getOptionalLogger()
-
isWarnLoggingEnabled
public boolean isWarnLoggingEnabled()Determines whether WARN logging is enabled.- Returns:
- a boolean value indicating whether WARN logging is enabled.
- See Also:
-
Logger.isWarnEnabled()getOptionalLogger()
-
isErrorLoggingEnabled
public boolean isErrorLoggingEnabled()Determines whether ERROR logging is enabled.- Returns:
- a boolean value indicating whether ERROR logging is enabled.
- See Also:
-
Logger.isErrorEnabled()getOptionalLogger()
-
isSingleton
public boolean isSingleton()Indicates that thisFactoryBeanproduces a single bean instance.- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<T>- Returns:
- true by default.
- See Also:
-
FactoryBean.isSingleton()
-
logDebug
-
logDebug
- Parameters:
message-Suppliercontaining themessageand arguments to log.- See Also:
-
Log.isDebugEnabled()Log.debug(Object)getLogger()
-
logInfo
-
logInfo
- Parameters:
message-Suppliercontaining themessageand arguments to log.- See Also:
-
Log.isInfoEnabled()Log.info(Object)getLogger()
-
logWarning
-
logWarning
- Parameters:
message-Suppliercontaining themessageand arguments to log.- See Also:
-
Log.isWarnEnabled()Log.warn(Object)getLogger()
-
logError
-
logError
- Parameters:
message-Suppliercontaining themessageand arguments to log.- See Also:
-
Log.isErrorEnabled()Log.error(Object)getLogger()
-