Skip to content

Commit

Permalink
Remove useless generic type of LockContext
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Dec 22, 2024
1 parent e65efa3 commit 265f69a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@

/**
* Lock context.
*
* @param <T> type of lock definition
*/
public interface LockContext<T extends LockDefinition> {
public interface LockContext {

/**
* Try Lock.
Expand All @@ -31,12 +29,12 @@ public interface LockContext<T extends LockDefinition> {
* @param timeoutMillis timeout milliseconds
* @return is locked or not
*/
boolean tryLock(T lockDefinition, long timeoutMillis);
boolean tryLock(LockDefinition lockDefinition, long timeoutMillis);

/**
* Unlock.
*
* @param lockDefinition lock definition
*/
void unlock(T lockDefinition);
void unlock(LockDefinition lockDefinition);
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* Cluster lock context.
*/
@RequiredArgsConstructor
public final class ClusterLockContext implements LockContext<LockDefinition> {
public final class ClusterLockContext implements LockContext {

private final LockPersistService<GlobalLockDefinition> globalLockPersistService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* Standalone lock context.
*/
public final class StandaloneLockContext implements LockContext<LockDefinition> {
public final class StandaloneLockContext implements LockContext {

@Override
public boolean tryLock(final LockDefinition lockDefinition, final long timeoutMillis) {
Expand Down

0 comments on commit 265f69a

Please sign in to comment.