public class Table {
int numslots;
- HashMap<IoTString, IoTString> table=new HashMap<IoTString, IoTString>();
+ HashMap<IoTString, KeyValue> table=new HashMap<IoTString, KeyValue>();
HashMap<Long, Long> lastmessage=new HashMap<Long, Long>();
SlotBuffer buffer;
CloudComm cloud;
}
void processEntry(KeyValue entry, SlotIndexer indexer, Slot slot) {
-
+ IoTString key=entry.getKey();
+ KeyValue oldvalue=table.get(key);
+ if (oldvalue != null) {
+ oldvalue.setDead();
+ }
+ table.put(key, entry);
}
void processEntry(LastMessage entry, SlotIndexer indexer, Slot slot) {
-
+ updateLastMessage(entry.getMachineID(), entry.getSequenceNumber(), null, entry);
}
void processEntry(RejectedMessage entry, SlotIndexer indexer, Slot slot) {
-
+
}
void processEntry(TableStatus entry, SlotIndexer indexer, Slot slot) {
+ }
+
+ void updateLastMessage(long machineid, long seqnum, Slot slot, LastMessage entry) {
+
}
void processSlot(SlotIndexer indexer, Slot slot) {
+ updateLastMessage(slot.getMachineID(), slot.getSequenceNumber(), slot, null);
+
for(Entry entry : slot.getEntries()) {
switch(entry.getType()) {
case Entry.TypeKeyValue: