This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/blag0j/sunny-apps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/njofce/api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/blag0j/sunny-apps | |
https://github.com/njofce/api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class QueueStack<T> { | |
private List<T> dataCollection; | |
QueueStack() { | |
dataCollection = new LinkedList<>(); | |
} | |
void push(T item) { | |
dataCollection.add(0, item); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Action { | |
void execute(); | |
void undo(); | |
String getName(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Action1 implements Action { | |
private String name; | |
public Action1(String name) { | |
this.name = name; | |
} | |
@Override | |
public void execute() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CommandManager { | |
private static CommandManager instance = null; | |
private QueueStack<List<Action>> queueStackNormal; | |
private QueueStack<List<Action>> queueStackReverse; | |
private List<String> actionHistory; | |
static CommandManager getInstance(){ | |
if(instance != null) | |
return instance; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CommandManager { | |
private static CommandManager instance = null; | |
private QueueStack<List<Action>> queueStackNormal; | |
private QueueStack<List<Action>> queueStackReverse; | |
private List<String> actionHistory; | |
static CommandManager getInstance(){ | |
if(instance != null) | |
return instance; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Autowired | |
private InstitutionManagementClient institutionManagementClient; // This is the Feign client | |
@HystrixCommand(fallbackMethod = “getAssociatedInstitutionFallback”, | |
threadPoolKey = “threadPoolInstitution”, | |
threadPoolProperties = { | |
@HystrixProperty(name = “coreSize”, value = “15”), | |
@HystrixProperty(name = “maxQueueSize”, value = “5”) | |
} | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@HystrixCommand(fallbackMethod = “getAssociatedInstitutionFallback”, | |
threadPoolKey = “threadPoolInstitution”, | |
threadPoolProperties = { | |
@HystrixProperty(name = “coreSize”, value = “15”), | |
@HystrixProperty(name = “maxQueueSize”, value = “5”) | |
}, | |
commandPoolProperties = { | |
@HystrixProperty(name=”circuitBreaker.requestVolumeThreshold”, value = ”5”) | |
@HystrixProperty(name=”circuitBreaker.errorThresholdPercentage”, value = “50”) | |
} |
OlderNewer