728x90
728x90
SynchronizedList / CopyOnWriteArrayList
Tech/Java & Spring2023. 6. 2. 06:16SynchronizedList / CopyOnWriteArrayList

[Java] 자바에서의 스레드 안전(Thread Safe)과 모니터(monitor)연관 게시물 https://mag1c.tistory.com/364 스레드 안전 - Thread Safe 연관 게시물 https://mag1c.tistory.com/365 [Java] 자바에서의 스레드 안전(Thread Safe)과 모니터(monitor) 자바에서의 Thread-Safe 1. Lock synchronized 아래 mag1c.tistory.com 스레드 안전 - Thread Safe연관 게시물 https://mag1c.tistory.com/365 [Java] 자바에서의 스레드 안전(Thread Safe)과 모니터(monitor) 자바에서의 Thread-Safe 1. Lock synchronized 아래 코드는 ..

Tech/Java & Spring2023. 5. 31. 05:51ConcurrentHashMap이란? HashMap vs HashTable vs ConcurrentHashMap

Map의 인터페이스의 구현체로는 HashMap, HashTable, ConcurrentHashMap등이 있는데 thread-safe와 hashtable관련 포스팅을 했기 때문에 어떤 경우에 어떤 자료구조를 사용해야 하는지 알아보려 한다. [자료구조] 해시테이블 (hashtable)해시테이블 (hashtable) Key, Value 로 데이터를 저장하는 자료구조 중 하나이며 데이터를 빠르게 검색할 수 있는 자료구조이다. 빠른 검색을 할 수 있는 이유는 내부적으로 버킷(배열)을 사용하여 데mag1c.tistory.com [Java] 자바에서의 스레드 안전(Thread Safe)과 모니터(monitor)연관 게시물 https://mag1c.tistory.com/364 스레드 안전 - Thread Safe 연관..

스레드 안전 - Thread Safe
Tech/Java & Spring2023. 5. 24. 21:19스레드 안전 - Thread Safe

연관 게시물 [Java] 자바에서의 스레드 안전(Thread Safe)과 모니터(monitor) 자바에서의 Thread-Safe 1. Lock synchronized 아래 코드는 Synchronized 키워드를 사용하여 스레드의 안전성을 보장했다. @ThreadSafe public class Lock { @GuardedBy("this") private int nextValue; public synchronized int getNext() { r mag1c.tistory.com Thread Safe 스레드 안전(thread safety)은 멀티 스레드 프로그래밍에서 일반적으로 어떤 함수나 변수, 혹은 객체가 여러 스레드로부터 동시에 접근이 이루어져도 프로그램의 실행에 문제가 없음을 뜻한다. 보다 엄밀하게는..

Tech/Java & Spring2023. 3. 28. 06:33싱글톤(Singleton) 패턴

싱글톤 패턴이란? 클래스의 인스턴스가 오직 1개만 생성되는 디자인 패턴이다. public class SingletonPattern { private static SingletonPattern instance = new SingletonPattern(); //생성자는 private private SingletonPattern() { } public static SingletonPattern getInstance() { return instance; } public void what() { System.out.println("싱글톤패턴"); } public static void main(String[] args) { SingletonPattern s1 = SingletonPattern.getInstance(..

728x90
728x90
image