Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

Commit 642afee

Browse files
feat: Cleanable interface (#493)
1 parent d051bb5 commit 642afee

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* The MIT License (MIT) Copyright (c) 2020-2022 artipie.com
3+
* https://github.com/artipie/asto/LICENSE.txt
4+
*/
5+
package com.artipie.asto.misc;
6+
7+
/**
8+
* Cleanable interface to represent objects that can be cleaned/invalidated.
9+
* @param <T> The key type.
10+
* @since 1.16
11+
*/
12+
public interface Cleanable<T> {
13+
14+
/**
15+
* Invalidate object by the specified key.
16+
* @param key The key
17+
*/
18+
void invalidate(T key);
19+
20+
/**
21+
* Invalidate all.
22+
*/
23+
void invalidateAll();
24+
25+
}

0 commit comments

Comments
 (0)