How to retain the content of the variable on every call in java
Hi am developing a linked list in java. In my system there will one master node where the master node will distribute the incoming request to one of its slave node. In order to make use of cache memory, i initialized a linked list for each node (where all the content will be maintained in the master node). I update the linked list of respective node before the node process any query (so that i can find what are request recently processed by the respective nodes). But the problem is, at an instance when i try to find the content of the linked list its empty. Even when i try to add new content, it creates the list newly and then add the content. I think the list is created newly every time when i access the java file containing the linkedlist implementation. Is it possible to retain the content of the linked list and update the linked list with the previous content. Is their any inbuilt function in java to retain the state of the variable or where can i initialize the list in order to achieve what i expect. 
How to retain the content of the variable on every call in java
===

Hi am developing a linked list in java. In my system there will one master node where the master node will distribute the incoming request to one of its slave node. In order to make use of cache memory, i initialized a linked list for each node (where all the content will be maintained in the master node). I update the linked list of respective node before the node process any query (so that i can find what are request recently processed by the respective nodes). But the problem is, at an instance when i try to find the content of the linked list its empty. Even when i try to add new content, it creates the list newly and then add the content. I think the list is created newly every time when i access the java file containing the linkedlist implementation. Is it possible to retain the content of the linked list and update the linked list with the previous content. Is their any inbuilt function in java to retain the state of the variable or where can i initialize the list in order to achieve what i expect. 