I had a list with String values.I deployed the project in the cluster.
I had a get method which will be invoked by servers in the cluster.
when the request given by first server. it has to remove the first value in the list.
when the request given by other server,it has to remove the next value in the list.
So how to achieve this functionality?
I'm not sure what you're asking really?
No wonder. I'll translate the asked question into a different form: Hi, I have some things and stuff and now I want to do more things and stuff. How do I do that?
In a Q&A type situation such as a forum you can only discuss specifics; specific questions providing specific details and then you get specific answers. Such details often include posting code, providing system specifications and giving a clear problem description that is aimed at describing what is functionally to be achieved; often times people have fallen in love with a particular half-finished technical solution, can't go as far as finalizing it for themselves and go to a forum to get help with that and expecting that dropping such clues as "clustering" will be enough; that is simply asking too much because that would require someone to dive into your brain to see what you already half-constructed there and try to make sense of it - and then do that through something as remote and impersonal as a forum.
So no: the question asking part is far from complete in this thread. Provide specifics. Provide functional requirements. Provide system specifications (which servers, which APIs, which frameworks). Provide relevant code, or at least pseudo code. Paint a clear picture of what you're looking at so others might reconstruct that picture in their own head!