update
This commit is contained in:
parent
a207d663a7
commit
199f411275
2 changed files with 30 additions and 0 deletions
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -12,6 +12,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.sap.tamagotchi.model.Care;
|
||||||
import com.sap.tamagotchi.model.Device;
|
import com.sap.tamagotchi.model.Device;
|
||||||
import com.sap.tamagotchi.publisher.PublisherService;
|
import com.sap.tamagotchi.publisher.PublisherService;
|
||||||
|
|
||||||
|
@ -50,8 +51,13 @@ public class TamagotchiService {
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void takeCare(String decifeId, Care care) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Scheduled(fixedDelay = DEVICE_EVENT_PROCESSOR_SCHEDULE)
|
@Scheduled(fixedDelay = DEVICE_EVENT_PROCESSOR_SCHEDULE)
|
||||||
private void processDeviceEvents() {
|
private void processDeviceEvents() {
|
||||||
|
// Set<String> deadList = Collections.synchronizedSet(new HashSet());
|
||||||
deviceRegistry
|
deviceRegistry
|
||||||
.values()
|
.values()
|
||||||
.parallelStream()
|
.parallelStream()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue