MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / Packets

Method Packets

src/main/java/core/packetproxy/model/Packets.java:67–86  ·  view source on GitHub ↗
(boolean restore)

Source from the content-addressed store, hash-verified

65 private ExecutorService executor;
66
67 private Packets(boolean restore) throws Exception {
68 database = Database.getInstance();
69 database.addPropertyChangeListener(this);
70 if (!restore) {
71
72 log("drop history...");
73 database.dropPacketTableFaster();
74 }
75 dao = database.createTable(Packet.class);
76 if (restore) {
77
78 if (!isLatestVersion()) {
79
80 RecreateTable();
81 }
82 log("load history...");
83 log("load %d records.", dao.countOf());
84 }
85 executor = Executors.newSingleThreadExecutor();
86 }
87
88 // TODO できれば非同期でやる(大きいデータのときに数秒止まってしまうので)
89 public void create(Packet packet) throws Exception {

Callers

nothing calls this directly

Calls 8

getInstanceMethod · 0.95
isLatestVersionMethod · 0.95
RecreateTableMethod · 0.95
dropPacketTableFasterMethod · 0.80
createTableMethod · 0.80
countOfMethod · 0.80
logMethod · 0.65

Tested by

no test coverage detected