原创 CAP、BASE理論

目錄 CAP 原則 解釋 取捨策略 BASE理論 基本可用 軟狀態 最終一致性 參考 CAP 原則 CAP是指在一個分佈式系統中, Consistency(一致性)、 Availability(可用性)、Partition toleran

原创 Semaphore 簡單應用

@Slf4j public class SemaphoreTest { private static ExecutorService executorService = Executors.newFixedThreadPool(

原创 重寫 equals 與 hashCode

@Getter @Setter public class Person { private String idCard; private String name; @Override public b

原创 100個運動員,5個5個跑

public class Test { private static Executor executor = Executors.newCachedThreadPool(); public static void ma

原创 兒叉搜索樹

public class BinarySearchTree { private TreeNode root; private static class TreeNode { int data;