Skip to content

Commit deb1f1b

Browse files
committed
Remove unused code
1 parent b53378a commit deb1f1b

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

src/main/java/org/lmdbjava/Key.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,23 @@
2424

2525
/**
2626
* Represents off-heap memory holding a key only.
27+
* Equivalent to {@link KeyVal} without the val part.
2728
*
2829
* @param <T> buffer type
2930
*/
3031
final class Key<T> implements AutoCloseable {
3132

3233
private static final MemoryManager MEM_MGR = RUNTIME.getMemoryManager();
3334
private boolean closed;
34-
private T k;
35+
private final T k;
3536
private final BufferProxy<T> proxy;
3637
private final Pointer ptrKey;
37-
private final long ptrKeyAddr;
3838

3939
Key(final BufferProxy<T> proxy) {
4040
requireNonNull(proxy);
4141
this.proxy = proxy;
4242
this.k = proxy.allocate();
4343
ptrKey = MEM_MGR.allocateTemporary(MDB_VAL_STRUCT_SIZE, false);
44-
ptrKeyAddr = ptrKey.address();
4544
}
4645

4746
@Override
@@ -53,19 +52,10 @@ public void close() {
5352
proxy.deallocate(k);
5453
}
5554

56-
T key() {
57-
return k;
58-
}
59-
6055
void keyIn(final T key) {
6156
proxy.in(key, ptrKey);
6257
}
6358

64-
T keyOut() {
65-
k = proxy.out(k, ptrKey);
66-
return k;
67-
}
68-
6959
Pointer pointer() {
7060
return ptrKey;
7161
}

0 commit comments

Comments
 (0)