Search in sources :

Example 1 with IClusterable

use of org.apache.wicket.IClusterable in project servoy-client by Servoy.

the class WicketEvent method cleanup.

/**
 */
private void cleanup() {
    List<IClusterable> lst = session.getDirtyObjectsList();
    for (IClusterable dirtyObject : lst) {
        if (!dirtyObjectsList.contains(dirtyObject)) {
            dirtyObjectsList.add(dirtyObject);
        }
    }
    lst.clear();
    List<Page> pages = session.getTouchedPages();
    for (Page page : pages) {
        if (!touchedPages.contains(page)) {
            touchedPages.add(page);
        }
    }
    pages.clear();
    // copy over the current owned pages to the http threads list so that it owns and will release it.
    List<Page> toReleasePages = ((WebClientSession) session).getPagesToRelease();
    for (Page page : toReleasePages) {
        if (!pagesToRelease.contains(page)) {
            pagesToRelease.add(page);
        }
    }
    toReleasePages.clear();
    session.moveUsedPage(Thread.currentThread(), httpThread);
}
Also used : WebClientSession(com.servoy.j2db.server.headlessclient.WebClientSession) IClusterable(org.apache.wicket.IClusterable) Page(org.apache.wicket.Page)

Aggregations

WebClientSession (com.servoy.j2db.server.headlessclient.WebClientSession)1 IClusterable (org.apache.wicket.IClusterable)1 Page (org.apache.wicket.Page)1