This commit is contained in:
Steinwagner 2019-12-10 18:31:03 +01:00
parent a207d663a7
commit 199f411275
2 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,24 @@
package com.sap.tamagotchi.model;
public class Care {
private int feed = 0;
private int pet = 0;
public int getFeed() {
return feed;
}
public void setFeed(int feed) {
this.feed = feed;
}
public int getPet() {
return pet;
}
public void setPet(int pet) {
this.pet = pet;
}
}

View file

@ -12,6 +12,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import com.sap.tamagotchi.model.Care;
import com.sap.tamagotchi.model.Device;
import com.sap.tamagotchi.publisher.PublisherService;
@ -50,8 +51,13 @@ public class TamagotchiService {
return device;
}
public void takeCare(String decifeId, Care care) {
}
@Scheduled(fixedDelay = DEVICE_EVENT_PROCESSOR_SCHEDULE)
private void processDeviceEvents() {
// Set<String> deadList = Collections.synchronizedSet(new HashSet());
deviceRegistry
.values()
.parallelStream()