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

Method updateSync

src/main/java/core/packetproxy/model/Packets.java:101–118  ·  view source on GitHub ↗
(Packet packet)

Source from the content-addressed store, hash-verified

99 }
100
101 public void updateSync(Packet packet) throws Exception {
102 if (database.isAlertFileSize()) {
103
104 firePropertyChange(true);
105 }
106 Dao.CreateOrUpdateStatus status;
107 synchronized (dao) {
108
109 status = dao.createOrUpdate(packet);
110 }
111 if (status.isCreated()) {
112
113 firePropertyChange(packet.getId() * -1);
114 } else {
115
116 firePropertyChange(packet.getId());
117 }
118 }
119
120 public void update(Packet packet) throws Exception {
121 Runnable task = new Runnable() {

Callers 1

runMethod · 0.95

Calls 3

firePropertyChangeMethod · 0.95
isAlertFileSizeMethod · 0.80
getIdMethod · 0.65

Tested by

no test coverage detected