Skip to content

caoyj1991/Core-Java

Repository files navigation

Core-Java

framework

  • Create a web service container like tomcat
  • Create a web framework like spring

Web Framework Already Exist Events

  • Request filter
  • AOP
  • File scanner
  • Bean scope controller(only singleton now).
  • Annotation
    • Controller
    • Filter
    • Component
    • Service
    • RequestMapping

jdklib

Realize JDK API function

  • Lock
  • ThreadLocal
  • BlockingQueue

Already Exist API

  • Realize Lock action by using synchronized keyword
    • com.current.lock.v1.SynchronizedLock unfair lock can block thread
    • com.current.lock.v2.SynchronizedFairLock fair lock can block thread
      • when the first thread is not alive, will be removed from the chain.
    • com.current.lock.v3.SynchronizedShareLock fair lock & and add readLock & writeLock can block thread. readLock(),writeLock(),lock()
      • when the first thread is not alive, will be removed from the chain.
  • Realize BlockingQueue
    • com.current.queue.jdkAPI.ArraysSynchronizedQueue use synchronized and array
    • com.current.queue.projectAPI.ArraysSynchronizedLockQueue use SynchronizedLock and array

About

IO, NIO, Lock, BlockingQueue, Synchronized

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published