Record Class LockGroup.LockGroupGuard
java.lang.Object
java.lang.Record
cloud.opencode.base.lock.manager.LockGroup.LockGroupGuard
- Record Components:
group- the lock group to guard | 要守卫的锁组
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
LockGroup
public static record LockGroup.LockGroupGuard(LockGroup group)
extends Record
implements AutoCloseable
Lock Group Guard for Automatic Resource Release
锁组守卫 - 用于自动资源释放
Implements AutoCloseable for use with try-with-resources.
实现AutoCloseable接口,配合try-with-resources使用。
- Since:
- JDK 25, opencode-base-lock V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionLockGroupGuard(LockGroup group) Creates an instance of aLockGroupGuardrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()final booleanIndicates whether some other object is "equal to" this one.group()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LockGroupGuard
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
group
-