Class PartitionPoolable<T>
java.lang.Object
org.miaixz.bus.core.lang.pool.partition.PartitionPoolable<T>
- Type Parameters:
T- 对象类型
分区可池化对象,此对象会同时持有原始对象和所在的分区
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong获取最后借出时间getRaw()获取原始对象void归还对象voidsetLastBorrow(long lastBorrow) 设置最后借出时间,在成功借出此对象时更新时间
-
Constructor Details
-
PartitionPoolable
构造- Parameters:
raw- 原始对象partition- 对象所在分区
-
-
Method Details
-
getRaw
Description copied from interface:Wrapper获取原始对象 -
returnObject
public void returnObject()归还对象 -
getLastBorrow
public long getLastBorrow()Description copied from interface:Poolable获取最后借出时间- Specified by:
getLastBorrowin interfacePoolable<T>- Returns:
- 最后借出时间
-
setLastBorrow
public void setLastBorrow(long lastBorrow) Description copied from interface:Poolable设置最后借出时间,在成功借出此对象时更新时间- Specified by:
setLastBorrowin interfacePoolable<T>- Parameters:
lastBorrow- 最后借出时间
-