(TransactionContext tcx, final String index, final Object value)
| 124 | } |
| 125 | |
| 126 | public static boolean isElement(TransactionContext tcx, final String index, |
| 127 | final Object value){ |
| 128 | return tcx.run(new Function<Transaction,Boolean>() { |
| 129 | public Boolean apply(Transaction tr){ |
| 130 | return tr.get(multi.subspace( |
| 131 | Tuple.from(index, value)).getKey()).get() != null; |
| 132 | } |
| 133 | }); |
| 134 | } |
| 135 | |
| 136 | public static void clearSubspace(TransactionContext tcx, final Subspace s){ |
| 137 | tcx.run(new Function<Transaction,Void>() { |