Conversation
HyunJng
approved these changes
Dec 20, 2025
Comment on lines
+131
to
+135
| ### 질문 | ||
|
|
||
| Q. 실패 원자성이란 무엇인가요? | ||
|
|
||
| Q. 실패 원자성을 확보하는 방법 5가지를 나열해보세요. |
Member
There was a problem hiding this comment.
- 메서드가 예외를 던진다면, 호출부에서 전달한 매개변수나 static 인자가 메서드 실행 전 상태로 복구되어야하는 성질
- 답:
- 불변 객체 사용하기
- 메서드 앞단에서 전제조건 검사하기
- 실패 가능성 있는 작업을 메서드 앞단에서 실행하기
- 복구 코드 작성하기
- 임시객체에서 작업을 끝낸 후 마지막에 교체하기
HAONMIK1
approved these changes
Dec 23, 2025
Comment on lines
+133
to
+135
Contributor
There was a problem hiding this comment.
Q1. 메서드 호출이 실패하더라도, 객체의 상태는 호출 이전과 동일하게 유지되어야 한다
Q2.
- 불변 객체 사용
- 매개변수 유효성 검사를 먼저 수행
- 상태 변경은 마지막에 수행
- 예외 발생 시 복구 코드 작성
- 임시 객체에서 작업 후 성공 시 교체
kdmstj
reviewed
Dec 24, 2025
|
|
||
| ### 질문 | ||
|
|
||
| Q. 실패 원자성이란 무엇인가요? |
Contributor
There was a problem hiding this comment.
메서드 호출이 실패했을 경우 객체의 상태는 호출 이전과 동일해야 한다.
kdmstj
reviewed
Dec 24, 2025
|
|
||
| Q. 실패 원자성이란 무엇인가요? | ||
|
|
||
| Q. 실패 원자성을 확보하는 방법 5가지를 나열해보세요. |
Contributor
There was a problem hiding this comment.
- 불변 객체 사용
- 매개변수 유효성을 먼저 검사
- 상태 변경은 마지막에 검사
- 실패 시 복구 코드 작성
- 임시 객체에서 작업 후 교체
kdmstj
approved these changes
Dec 24, 2025
leevigong
approved these changes
Dec 26, 2025
Comment on lines
+133
to
+135
| Q. 실패 원자성이란 무엇인가요? | ||
|
|
||
| Q. 실패 원자성을 확보하는 방법 5가지를 나열해보세요. |
Contributor
There was a problem hiding this comment.
A1)
실패원자성은 메서드 호출이 실패하더라도, 객체의 상태는 호출 이전과 동일하게 유지되어야 한다는 의미이다
A2)
- 불변 객체 사용
- 매개변수 유효성 먼저 수행
- 상태 변경은 마지막에 검사
- 실패 시 복구 코드 작성
- 임시 객체에서 작업 후 교체
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closed #148
🙆🏻 내용을 이해하기 쉽고 정확하게 작성하였는가?
📚 글 하단에 예상질문, 참고자료를 포함시켰는가?
🔖 라벨은 등록했는가?
✅ 이슈는 닫았는가?