public void storePage(String sessionId, Page page) { SessionPageKey key = new SessionPageKey(sessionId, page); byte[] serialized = Objects.objectToByteArray(page); // map.put(key, serialized); savePage(key, serialized); }
public void storePage(String sessionId, Page page) { SessionPageKey key = new SessionPageKey(sessionId, page); byte[] serialized = Objects.objectToByteArray(page); // map.put(key, serialized); savePage(key, serialized); }
initialPage.setData(Objects.objectToByteArray(page.getPageMapEntry()));
initialPage.setData(Objects.objectToByteArray(page.getPageMapEntry()));
public Object getPageReplacementObject(Page callingPage) { SerializedPage calling = new SerializedPage(callingPage); // if current page writeObject is called we need to really serialize the page instance if (calling.equals(current)) { completed.add(calling); return callingPage; } else // serializing page referenced from current page { // if the referenced page has not yet been serialized... if (completed.contains(calling) == false) { // ...get the bytearray representation of it SerializedPage prev = current; current = calling; current.data = Objects.objectToByteArray(callingPage); // invoke callback with the data onPageSerialized(current); current = prev; } // return page holder instance (object that will readResolve to // actual page instance return new PageHolder(callingPage); } }
public Object getPageReplacementObject(Page callingPage) { SerializedPage calling = new SerializedPage(callingPage); // if current page writeObject is called we need to really serialize the page instance if (calling.equals(current)) { completed.add(calling); return callingPage; } else // serializing page referenced from current page { // if the referenced page has not yet been serialized... if (completed.contains(calling) == false) { // ...get the bytearray representation of it SerializedPage prev = current; current = calling; current.data = Objects.objectToByteArray(callingPage); // invoke callback with the data onPageSerialized(current); current = prev; } // return page holder instance (object that will readResolve to // actual page instance return new PageHolder(callingPage); } }