(@NotNull K key)
| 720 | |
| 721 | // 几乎和Put一样,还是独立开吧。 |
| 722 | public final void remove(@NotNull K key) { |
| 723 | var currentT = Transaction.getCurrent(); |
| 724 | assert currentT != null; |
| 725 | //noinspection ConstantValue |
| 726 | if (key == null) |
| 727 | throw new IllegalArgumentException("key is null"); |
| 728 | |
| 729 | var tkey = new TableKey(getId(), key); |
| 730 | var cr = currentT.getRecordAccessed(tkey); |
| 731 | if (cr != null) { |
| 732 | cr.put(currentT, null); |
| 733 | return; |
| 734 | } |
| 735 | |
| 736 | var r = load(key); |
| 737 | cr = new RecordAccessed(r); |
| 738 | currentT.addRecordAccessed(r.record.createRootInfoIfNeed(tkey), cr, r.strongRef == null && isMemory()); |
| 739 | cr.put(currentT, null); |
| 740 | } |
| 741 | |
| 742 | @Override |
| 743 | public final @Nullable Storage<?, ?> open(@NotNull Application app, @NotNull Database database, |
no test coverage detected