In the tradition of Kashmir Shaivism enlightenment or liberation can be said to have been attained when a yogi has attained the intensity of the supreme state of God consciousness and feels that everywhere the oneness of Shiva is existing. In the sacred text Shiva Sutras Lord Shiva tells us that when this state is attained while in the
body then this yogi becomes just like Shiva. He does not become one with Shiva, he becomes just like Shiva.
Because he remains in his body, his physical frame. His physical frame will divert him to inferior states. For instance he might cough, have a headache, stomach pain, fever, etc. This does not happen to Shiva. As long as the body is there he becomes just like Shiva. When his body drops away at the time of death of the physical frame then he becomes one with Shiva. This is the state known as the great liberation or Mahasamadhi.