/** * Pre process the write request before it is sent to the server, eg. by setting the * {@link WriteRequest#setRefreshPolicy(String) refresh policy} if applicable. * * @param request must not be {@literal null}. * @param <R> * @return the processed {@link WriteRequest}. */ protected <R extends WriteRequest<R>> R prepareWriteRequest(R request) { if (refreshPolicy == null) { return request; } return request.setRefreshPolicy(refreshPolicy); }
/** * Parse the refresh policy from a string, only modifying it if the string is non null. Convenient to use with request parsing. */ @SuppressWarnings("unchecked") default B setRefreshPolicy(String refreshPolicy) { request().setRefreshPolicy(refreshPolicy); return (B) this; } }
/** * Parse the refresh policy from a string, only modifying it if the string is non null. Convenient to use with request parsing. */ @SuppressWarnings("unchecked") default R setRefreshPolicy(String refreshPolicy) { if (refreshPolicy != null) { setRefreshPolicy(RefreshPolicy.parse(refreshPolicy)); } return (R) this; }
/** * Should this request trigger a refresh ({@linkplain RefreshPolicy#IMMEDIATE}), wait for a refresh ( * {@linkplain RefreshPolicy#WAIT_UNTIL}), or proceed ignore refreshes entirely ({@linkplain RefreshPolicy#NONE}, the default). */ @SuppressWarnings("unchecked") default B setRefreshPolicy(RefreshPolicy refreshPolicy) { request().setRefreshPolicy(refreshPolicy); return (B) this; }
/** * Parse the refresh policy from a string, only modifying it if the string is non null. Convenient to use with request parsing. */ @SuppressWarnings("unchecked") default B setRefreshPolicy(String refreshPolicy) { request().setRefreshPolicy(refreshPolicy); return (B) this; } }
/** * Parse the refresh policy from a string, only modifying it if the string is non null. Convenient to use with request parsing. */ @SuppressWarnings("unchecked") default R setRefreshPolicy(String refreshPolicy) { if (refreshPolicy != null) { setRefreshPolicy(RefreshPolicy.parse(refreshPolicy)); } return (R) this; }
/** * Should this request trigger a refresh ({@linkplain RefreshPolicy#IMMEDIATE}), wait for a refresh ( * {@linkplain RefreshPolicy#WAIT_UNTIL}), or proceed ignore refreshes entirely ({@linkplain RefreshPolicy#NONE}, the default). */ @SuppressWarnings("unchecked") default B setRefreshPolicy(RefreshPolicy refreshPolicy) { request().setRefreshPolicy(refreshPolicy); return (B) this; }
/** * Parse the refresh policy from a string, only modifying it if the string is non null. Convenient to use with request parsing. */ @SuppressWarnings("unchecked") default B setRefreshPolicy(String refreshPolicy) { request().setRefreshPolicy(refreshPolicy); return (B) this; } }
/** * Parse the refresh policy from a string, only modifying it if the string is non null. Convenient to use with request parsing. */ @SuppressWarnings("unchecked") default B setRefreshPolicy(String refreshPolicy) { request().setRefreshPolicy(refreshPolicy); return (B) this; } }
/** * Parse the refresh policy from a string, only modifying it if the string is non null. Convenient to use with request parsing. */ @SuppressWarnings("unchecked") default R setRefreshPolicy(String refreshPolicy) { if (refreshPolicy != null) { setRefreshPolicy(RefreshPolicy.parse(refreshPolicy)); } return (R) this; }
/** * Should this request trigger a refresh ({@linkplain RefreshPolicy#IMMEDIATE}), wait for a refresh ( * {@linkplain RefreshPolicy#WAIT_UNTIL}), or proceed ignore refreshes entirely ({@linkplain RefreshPolicy#NONE}, the default). */ @SuppressWarnings("unchecked") default B setRefreshPolicy(RefreshPolicy refreshPolicy) { request().setRefreshPolicy(refreshPolicy); return (B) this; }
/** * Parse the refresh policy from a string, only modifying it if the string is non null. Convenient to use with request parsing. */ @SuppressWarnings("unchecked") default R setRefreshPolicy(String refreshPolicy) { if (refreshPolicy != null) { setRefreshPolicy(RefreshPolicy.parse(refreshPolicy)); } return (R) this; }
/** * Should this request trigger a refresh ({@linkplain RefreshPolicy#IMMEDIATE}), wait for a refresh ( * {@linkplain RefreshPolicy#WAIT_UNTIL}), or proceed ignore refreshes entirely ({@linkplain RefreshPolicy#NONE}, the default). */ @SuppressWarnings("unchecked") default B setRefreshPolicy(RefreshPolicy refreshPolicy) { request().setRefreshPolicy(refreshPolicy); return (B) this; }