1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.maxur.perfmodel.backend.service;
17
18 import org.iq80.leveldb.WriteBatch;
19
20 import java.io.IOException;
21 import java.io.Serializable;
22 import java.util.Collection;
23 import java.util.Optional;
24
25
26
27
28
29
30 public interface DataSource {
31
32 <T> Optional<T> get(String key) throws IOException, ClassNotFoundException;
33
34 <T> Collection<T> findAllByPrefix(String prefix) throws IOException, ClassNotFoundException;
35
36 void delete(String key);
37
38 WriteBatch createWriteBatch();
39
40 void commit(WriteBatch batch);
41
42 void put(String key, Serializable value) throws IOException;
43 }