Implement additional Region data access operations.

Implement Region.invalidate(key).

Implement Region.remove(key).

Re-implement Region.get(key), Region.getEntry(key) and Region.put(key) to handle invalidated keys (Region entries).
This commit is contained in:
John Blum
2019-06-14 14:37:11 -07:00
parent 6f4367e963
commit 0b01f6b240
2 changed files with 80 additions and 6 deletions

View File

@@ -89,6 +89,14 @@ public class MockClientCacheApplicationIntegrationTests {
assertThat(this.example.getName()).isEqualTo("Example");
assertThat(this.example.put(1, "test")).isNull();
assertThat(this.example.get(1)).isEqualTo("test");
assertThat(this.example.containsKey(1)).isTrue();
this.example.invalidate(1);
assertThat(this.example.containsKey(1)).isTrue();
assertThat(this.example.get(1)).isNull();
assertThat(this.example.remove(1)).isNull();
assertThat(this.example.containsKey(1)).isFalse();
}
@ClientCacheApplication