|
ZetaGrid v1.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--zeta.handler.SynchronizationHandler
Handles a GET and a POST request to synchronize the data of this server with the data of another server.
The GET request req can contain the following parameters:
successful - timestamp of the last synchronized SQL statement of the other server.timestamp - smallest timestamp of the not synchronized SQL statement of the other server.resp contains the parameters (size of the not aligned data, timestamp, successful, data) of the new work units.
The POST request must contains the following parameters which are transfered
at the header name 'Param-String':
server_id - server ID.statements_length - size of the not aligned data.
| Field Summary | |
private ZetaServlet |
servlet
Servlet which owns this handler. |
| Constructor Summary | |
SynchronizationHandler(ZetaServlet servlet)
|
|
| Method Summary | |
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Handles a GET request to synchronize the data of this server with the data of another server. |
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Handles a POST request to synchronize the data of this server with the data of another server. |
private static java.lang.String |
getParameter(java.util.Map parameter,
java.lang.String key)
Returns a value for a key from the specified map with parameters. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private ZetaServlet servlet
| Constructor Detail |
public SynchronizationHandler(ZetaServlet servlet)
servlet - servlet which owns this handler.| Method Detail |
public void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.io.IOException
req must contains the following parameters:
successful - timestamp of the last synchronized SQL statement of the other server.timestamp - smallest timestamp of the not synchronized SQL statement of the other server.resp contains the parameters (size of data, timestamp, successful, data) of the new work units.
doGet in interface GetHandlerjavax.servlet.ServletException
java.io.IOException
public void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.io.IOException
server_id - server ID.statements_length - size of the not aligned data.resp contains an 'ok' or an error.
The data will be sequentially synchronized.
doPost in interface PostHandlerjavax.servlet.ServletException
java.io.IOException
private static java.lang.String getParameter(java.util.Map parameter,
java.lang.String key)
parameter - map with parameterskey - key
|
ZetaGrid v1.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||