|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet ch3.sharedVariable.error.Controller ch3.sharedVariable.Controller
public class Controller
Extends the shared variable example, but synchronizes the access to the variable so that there is not sharing error.
Field Summary |
---|
Fields inherited from class ch3.sharedVariable.error.Controller |
---|
accessCount |
Constructor Summary | |
---|---|
Controller()
|
Method Summary | |
---|---|
void |
incrementSharedVariable()
Helper method that simulates loading a variable into memory, incrementing it and storing it back into memory. |
Methods inherited from class ch3.sharedVariable.error.Controller |
---|
doGet, jspLocation |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Controller()
Method Detail |
---|
public void incrementSharedVariable()
incrementSharedVariable
in class Controller
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |