@SuppressWarnings("unchecked") @Override protected R prefetch(A action) { try { Object value = getCache().get(action); if (value != null) { return (R) value; } else { return null; } } catch (Exception e) { return null; } } }
@Override public DispatchRequest undo(A action, R result, AsyncCallback<Void> callback, UndoCommand<A, R> undoCommand) { // Remove the cached entry getCache().remove(action); // Undo the previous action return undoCommand.undo(action, result, callback); }
@Override public DispatchRequest undo(A action, R result, AsyncCallback<Void> callback, UndoCommand<A, R> undoCommand) { // Remove the cached entry getCache().remove(action); // Undo the previous action return undoCommand.undo(action, result, callback); }
@SuppressWarnings("unchecked") @Override protected R prefetch(A action) { try { // Check if Action available in Cache Object value = super.getCache().get(action); if (value != null && value instanceof Result) { return (R) value; } else { return null; } } catch (Exception e) { return null; } } }