Package io.hekate.spring.bean.lock
Class LockBean
- java.lang.Object
-
- io.hekate.spring.bean.HekateBaseBean<DistributedLock>
-
- io.hekate.spring.bean.lock.LockBean
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.FactoryBean<DistributedLock>
,org.springframework.beans.factory.InitializingBean
public class LockBean extends HekateBaseBean<DistributedLock> implements org.springframework.beans.factory.InitializingBean
ImportsDistributedLock
into a Spring context.
-
-
Constructor Summary
Constructors Constructor Description LockBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
String
getName()
Returns the lock name (seesetName(String)
).DistributedLock
getObject()
Class<DistributedLock>
getObjectType()
String
getRegion()
Returns the lock region name (seesetRegion(String)
).void
setName(String name)
Sets the lock name.void
setRegion(String region)
Sets the name of a lock region.-
Methods inherited from class io.hekate.spring.bean.HekateBaseBean
getSource, isSingleton, setBeanFactory, setSource
-
-
-
-
Method Detail
-
getObject
public DistributedLock getObject() throws Exception
- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean<DistributedLock>
- Throws:
Exception
-
getObjectType
public Class<DistributedLock> getObjectType()
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<DistributedLock>
-
getName
public String getName()
Returns the lock name (seesetName(String)
).- Returns:
- Lock name.
-
setName
public void setName(String name)
Sets the lock name.- Parameters:
name
- Lock name.- See Also:
LockRegion.get(String)
-
getRegion
public String getRegion()
Returns the lock region name (seesetRegion(String)
).- Returns:
- Lock region name.
-
setRegion
public void setRegion(String region)
Sets the name of a lock region.- Parameters:
region
- Lock region name.- See Also:
LockRegionConfig.setName(String)
-
-