daily pastebin goal
5%
SHARE
TWEET

Untitled

a guest Dec 13th, 2018 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class KeyValueVersionConverterFactory implements CacheEventConverterFactory {
  2.    private KeyValueVersionConverterFactory() {
  3.    }
  4.  
  5.    public static KeyValueVersionConverterFactory SINGLETON = new KeyValueVersionConverterFactory();
  6.  
  7.    @Override
  8.    public <K, V, C> CacheEventConverter<K, V, C> getConverter(Object[] params) {
  9.       KeyValueVersionConverter converter;
  10.       if (params != null && params.length > 0 && params[0].equals(Boolean.TRUE)) {
  11.          converter = KeyValueVersionConverter.INCLUDING_OLD_VALUE_CONVERTER;
  12.       } else {
  13.          converter = KeyValueVersionConverter.EXCLUDING_OLD_VALUE_CONVERTER;
  14.       }
  15.       return (CacheEventConverter<K, V, C>) converter;
  16.    }
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top