-
Notifications
You must be signed in to change notification settings - Fork 49
FEAT: Add listener to Future for compatibility with spymemcached #980
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
Conversation
cc05231 to
7760ce6
Compare
|
Generic ์ฌ์ฉ์ด ๊ณผํ๋ค๋ ๋๋์ด ์๋๋ฐ, spymemcached์ ๋ง์ถ์ด์ผ ํ๋ ๊ฑด๊ฐ์? |
|
์ผ๋จ ๊ตฌํ์ spymemcached๋ฅผ ๊ธฐ์ค์ผ๋ก ๋ง์ท์ต๋๋ค. |
|
@singsangssong |
7760ce6 to
76db758
Compare
|
๊ตฌํ์ ๋ค๋ฅธ์ ์ ์ฒซ ์ฝ๋ฉํธ์ ๋ณผ๋์ฒด๋ก ํ์ํด๋์์ต๋๋ค. |
76db758 to
4a648be
Compare
6db8484 to
19949cb
Compare
19949cb to
9c25bdd
Compare
9c25bdd to
d3392ba
Compare
41636a9 to
5e01f62
Compare
|
๊ฐ๋จํ๊ฒ ํ
์คํธ์ฝ๋๊น์ง ์ถ๊ฐํ์์ต๋๋ค. ํด๋น ๋ฆฌ์ค๋๋ฅผ ํ
์คํธํ ๊ณณ์ด ๋ง๋
ํ์ง ์์์ |
5e01f62 to
f8a8dc8
Compare
f8a8dc8 to
b3da456
Compare
oliviarla
left a comment
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.
-
(@singsangssong) ConnectionFactoryBuilder ์๋ ExecutorService ์ค์ ํ๋ ๊ธฐ๋ฅ์ด ์์ผ๋ ํจ๊ป ์ถ๊ฐ๋์ด์ผ ํฉ๋๋ค.
-
(@uhm0311 @jhpark816) ์ง๊ธ Listener ํด๋์ค๋ฅผ ํ๋๋ง ๋๊ณ ์์ด์ ์ค์ spymemcached์ ์กด์ฌํ๋ BulkGetCompletionListener, GetCompletionListener ๋ฅผ ์์ฑํด ์ฌ์ฉํ๋ ๊ฒฝ์ฐ arcus java client์๋ ํด๋น ํด๋์ค๊ฐ ์์ผ๋ฏ๋ก ๋ฐ๋ก ๋ง์ด๊ทธ๋ ์ด์ ์ด ๋ถ๊ฐ๋ฅํฉ๋๋ค. ์ ๋ ์ด๋ถ๋ถ๋ ์ต๋ํ ํธํํ๋๊ฒ ์ข๋ค๋ ์ ์ฅ์ธ๋ฐ ์ด๋ป๊ฒ ์๊ฐํ์๋์?
| } | ||
| } else { | ||
| MemcachedConnection.opsSucceeded(ops); | ||
| signalComplete(); |
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.
์ด ๋ฉ์๋๋ฅผ ์ฌ๊ธฐ์ ํธ์ถํ ํ์ ์์ต๋๋ค.
| * on futures. | ||
| */ | ||
| ExecutorService getListenerExecutorService(); | ||
|
|
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.
boolean isDefaultExecutorService(); ๋ ์ถ๊ฐํด์ผ ํ ๊ฒ ๊ฐ์ต๋๋ค.
b3da456 to
bc39a40
Compare
|
@singsangssong BulkGetCompletionListener, GetCompletionListener ํด๋์ค๋ spymemcached์ ๋์ผํ๊ฒ ์ถ๊ฐํด์ฃผ์๋ฉด ์ข๊ฒ ์ต๋๋ค. |
|
์ด์ ๋ฆฌ๋ทฐ๋ฅผ ํตํด์ ์ ๋ค๋ฆญ์ ์ ๊ฑฐํ ๊ตฌ์กฐ์ธ๋ฐ, ์ด๋ฅผ ๊ธฐ์กด spymemcached์ฒ๋ผ ์ ๋ค๋ฆญ์ ์ถ๊ฐํ๋์?
ํด๋น ์ฝ๋ฉํธ๋ก๋ ๊ตฌํ์ ๊ธฐ์กด spymemcached์์ ๊ฐ์ ธ์ค๋ ๊ฒ์ผ๋ก ์ดํดํ์ต๋๋ค. |
|
spymemcached ํธํ์ ๋ง์ถ์ง ์๊ธฐ๋ก ๊ฒฐ์ ๋์ด closeํฉ๋๋ค. |
๐ Related Issue
โจ๏ธ What I did
Spymemcached์์ ํธํ์ฑ์ ๋ง์ถ๊ธฐ ์ํด Future ๊ฐ์ฒด์ ๋ฆฌ์ค๋(listener)๋ฅผ ์ถ๊ฐํ๋ ๊ธฐ๋ฅ์ ๊ตฌํํ์ต๋๋ค. ์ด์
.addListener()๋ฅผ ์ฌ์ฉํ์ฌ ์์ ์๋ฃ ํ ์คํ๋ ๋ก์ง์ ๋ฑ๋กํ ์ ์์ต๋๋ค.spymemcached์์๋
GetFutureํด๋์ค๊ฐAbstractListenableFutureํด๋์ค ์ถ๊ฐExecutorService๋ฅผ ํตํ ๋ฆฌ์ค๋ ์คํOperationFuture,BulkGetFutureํด๋์ค๋AbstractListenableFuture๋ฅผ ์์๋ฐ์ ๋ฆฌ์ค๋ ๊ธฐ๋ฅ์ ๊ฐ๋๋ก ๊ตฌ์กฐ๋ฅผ ๋ณ๊ฒฝํ์ต๋๋ค.GetFuture์ ๊ฒฝ์ฐ, Spymemcached์ ๋ฌ๋ฆฌ Arcus์ ๊ธฐ์กด ๊ตฌ์กฐ์ธGetFuture extends OperationFuture๋ฅผ ์ ์งํ์ต๋๋ค. ์ด๋ฅผ ํตํดGetFuture๋OperationFuture๋ก๋ถํฐ ๋ฆฌ์ค๋ ๊ธฐ๋ฅ์ ์๋์ผ๋ก ์์๋ฐ์ผ๋ฉฐ, ์์ ์GetResult๊ฐ์ฒด๋ฅผ ์ฒ๋ฆฌํ ์ ์๋๋ก ํ์ต๋MemcachedClient์์ asyncGet,asyncGets,asyncStore๋ฑOperationFuture๋ฅผ ์์ฑํ๋ ๋ชจ๋ ๋ฉ์๋์์ExecutorService๋ฅผ ์ฃผ์ ํ๋๋ก ์์ ํ์ต๋๋ค.