-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refator: Remove callback field #842
Conversation
@jhpark816 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰 μλ£
@@ -94,6 +92,8 @@ public CollectionPipedInsertOperationImpl(String key, | |||
public void handleLine(String line) { | |||
assert getState() == OperationState.READING | |||
: "Read ``" + line + "'' when in " + getState() + " state"; | |||
CollectionPipedInsertOperation.Callback cb = | |||
(CollectionPipedInsertOperation.Callback) getCallback(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ§λ¬Έμ
λλ€.
νμ
μΊμ€ν
μ ν΄μΌ νλμ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
λ€ νμ¬ getCallback()
νΈμΆ μ OperationCallback
νμ
μ λ°ννκ² λ©λλ€.
μ΄λ handleLine
λ©μλμμ OperationCallback
μ extend
ν CollectionPipedInsertOperation.Callback
μ λ©μλμΈ gotStatus
λ₯Ό μ¬μ©νκ³ μμ΅λλ€.
λ°λΌμ νμ
μΊμ€ν
μ νμ¬ μ΄λ₯Ό νΈμΆ ν μ μλλ‘ ν΄μΌν©λλ€.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
λ³μ νμ
μ΄ CollectionPipedInsertOperation.Callback
μ΄λ―λ‘, gotStatus()
νΈμΆνλ λ° λ¬Έμ κ° μμ§ μλμ?
CollectionPipedInsertOperation.Callback cb = getCallback();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getCallback
μμλ OperationCallback
νμ
μ λ°ννλλ° μ΄λ Callback
μ μμ νμ
μ΄κΈ° λλ¬Έμ λ€μ΄ μΊμ€ν
μ ν΄μΌν©λλ€.
λ°λΌμ μ»΄νμΌλ¬λ ν΄λΉ κ°μ²΄κ° μ€μ λ‘ Callback νμ
μΈμ§ μ μ μκΈ° λλ¬Έμ λͺ
μμ ν λ³νμ ν΅ν΄ μΊμ€ν
μ ν΄μ£Όμ΄μΌν©λλ€.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cheesecrust
μμ±μμ μλ μ½λκ° μμ΅λλ€.
this.cb = (Callback) cb;
κ·Έλ¬λ©΄, μλ μ½λλ κ°λ₯νκ°μ?
CollectionPipedInsertOperation.Callback cb = (Callback) getCallback();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ κ°λ₯ν©λλ€λ§ μ νν νμ ννμ μν΄μ
CollectionPipedInsertOperation.Callback cb =
(CollectionPipedInsertOperation.Callback) getCallback();
μ μ²λΌ νμμ΅λλ€.
https://github.com/jam2in/arcus-works/issues/623#issuecomment-2511333536 |
π Related Issue
β¨οΈ What I did
Impl
μμ ꡬννκ³ μλ λ°©μκ³Ό λμΌνκ²callback
μImpl
class νλμμ μ μ₯νκ³ μ°λ λ°©μμμhandleLine()
μμ μμ κ°μ²΄μμ κ°μ Έμμ μΊμ€ν μ νλ λ°©μμΌλ‘ ν΅μΌνμμ΅λλ€.