naver / arcus-java-client

ARCUS Java client
Apache License 2.0
50 stars 47 forks source link

INTERNAL: Make final class which is not inherit #823

Closed cheesecrust closed 1 month ago

cheesecrust commented 1 month ago

πŸ”— Related Issue

⌨️ What I did

상속이 ν•„μš”μ—†λŠ” ν΄λž˜μŠ€μ— λŒ€ν•΄ final 클래슀둜 λ§Œλ“­λ‹ˆλ‹€.

CacheMonitor, MigrationMonitor, MemcachedReplicationGroupImpl, CacheManager, ArcusReplNodeAddress, MemcachedNodeROImpl,MemcachedReplicaGroupImpl,MemcachedReplicaGroupROImpl` ν΄λž˜μŠ€λ“€μ„ final 둜 λ³€κ²½ν•©λ‹ˆλ‹€.

oliviarla commented 1 month ago

@cheesecrust PR 성격 자체λ₯Ό "상속이 ν•„μš”μ—†λŠ” ν΄λž˜μŠ€μ— λŒ€ν•΄ final 클래슀둜 λ§Œλ“ λ‹€" 둜 λ³€κ²½ν•˜κ³ , final을 달아도 λ˜κ² λ‹€κ³  μƒκ°λ˜λŠ” ν΄λž˜μŠ€λ“€μ„ μ½”λ©˜νŠΈλ‘œ λ‹¬μ•„μ£Όμ„Έμš”. μ§€κΈˆμ€ spy.memcached νŒ¨ν‚€μ§€λ§Œ κ²€ν† ν•˜λ©΄ 될 것 κ°™μŠ΅λ‹ˆλ‹€.

μ½”λ©˜νŠΈλ₯Ό 보고 변경해도 λ λ§Œν•œ ν΄λž˜μŠ€μΈμ§€ μ €λ‚˜ λ‹€λ₯Έ 뢄이 κ²€μ¦λœ 후에 μ½”λ“œ μˆ˜μ •ν•΄μ£Όμ‹œλ©΄ 될 것 κ°™μŠ΅λ‹ˆλ‹€.

jhpark816 commented 1 month ago

@oliviarla λ³Έ PR의 처음 μ½”λ©˜νŠΈμ— λͺ…μ‹œν•œ ν΄λž˜μŠ€λ“€μ΄ final class λ°©μ‹μœΌλ‘œ lint μ›Œλ‹μ„ ν•΄κ²°ν•  클래슀 λͺ©λ‘μ΄λΌκ³  μƒκ°λ©λ‹ˆλ‹€.

oliviarla commented 1 month ago

@jhpark816 lint μ›Œλ‹ λ°œμƒν•˜λŠ” 클래슀 이외에도 final둜 λ‘˜ 수 μžˆλŠ” 클래슀라면 final둜 λ³€κ²½ν•˜λŠ” μž‘μ—…μ„ ν•˜κ³ μž ν•©λ‹ˆλ‹€.

jhpark816 commented 1 month ago

@oliviarla OK. μ˜λ„λ₯Ό μ•Œκ² μŠ΅λ‹ˆλ‹€.

cheesecrust commented 1 month ago

@oliviarla spy.memcached package μ—μ„œ μ•„λž˜μ˜ class 듀을 μΆ”κ°€μ μœΌλ‘œ final 둜 변경해도 될 것 κ°™μŠ΅λ‹ˆλ‹€.

ArcusReplNodeAddress CacheMap CASMutator CASValue MemcachedNodeROImpl MemcachedReplicaGroupImpl MemcachedReplicaGroupROImpl PartitionedList PartitionedMap StatisticsHandler

jhpark816 commented 1 month ago

@oliviarla λ³Έ PR 외에 μ•„λž˜λ§Œ final class둜 μΆ”κ°€ν•˜λŠ” 것은 μ–΄λ–€κ°€μš”?

ArcusReplNodeAddress
MemcachedNodeROImpl
MemcachedReplicaGroupImpl
MemcachedReplicaGroupROImpl
oliviarla commented 1 month ago

@cheesecrust @jhpark816 λ‹˜μ΄ λ§μ”€ν•˜μ‹  λ„€ 가지 ν΄λž˜μŠ€μ—λ§Œ final 적용 λΆ€νƒλ“œλ¦½λ‹ˆλ‹€!

cheesecrust commented 1 month ago

@oliviarla λ°˜μ˜ν•˜μ˜€μŠ΅λ‹ˆλ‹€.