Examples of PersonObjectFactory


Examples of org.springframework.data.keyvalue.redis.support.collections.PersonObjectFactory

public class PubSubTestParams {

  public static Collection<Object[]> testParams() {
    // create Jedis Factory
    ObjectFactory<String> stringFactory = new StringObjectFactory();
    ObjectFactory<Person> personFactory = new PersonObjectFactory();

    JedisConnectionFactory jedisConnFactory = new JedisConnectionFactory();
    jedisConnFactory.setUsePool(true);
    jedisConnFactory.setPort(SettingsUtils.getPort());
    jedisConnFactory.setHostName(SettingsUtils.getHost());
View Full Code Here

Examples of org.springframework.data.redis.PersonObjectFactory

    Jackson2JsonRedisSerializer<Person> jackson2JsonSerializer = new Jackson2JsonRedisSerializer<Person>(Person.class);
    StringRedisSerializer stringSerializer = new StringRedisSerializer();

    // create Jedis Factory
    ObjectFactory<String> stringFactory = new StringObjectFactory();
    ObjectFactory<Person> personFactory = new PersonObjectFactory();
    ObjectFactory<byte[]> rawFactory = new RawObjectFactory();

    JedisConnectionFactory jedisConnFactory = new JedisConnectionFactory();
    jedisConnFactory.setUsePool(true);
View Full Code Here

Examples of org.springframework.data.redis.PersonObjectFactory

   * @see DATAREDIS-241
   */
  @Test
  public void testJackson2JsonSerializer() throws Exception {

    Person person = new PersonObjectFactory().instance();
    assertEquals(person, serializer.deserialize(serializer.serialize(person)));
  }
View Full Code Here

Examples of org.springframework.data.redis.PersonObjectFactory

   * @see DTATREDIS-241
   */
  @Test(expected = SerializationException.class)
  public void testJackson2JsonSerilizerShouldThrowExceptionWhenDeserializingInvalidByteArray() {

    Person person = new PersonObjectFactory().instance();
    byte[] serializedValue = serializer.serialize(person);
    Arrays.sort(serializedValue); // corrupt serialization result

    serializer.deserialize(serializedValue);
  }
View Full Code Here

Examples of org.springframework.data.redis.PersonObjectFactory

    PoolConfig defaultPoolConfig = new PoolConfig();
    defaultPoolConfig.setMaxActive(1000);

    // create Jedis Factory
    ObjectFactory<String> stringFactory = new StringObjectFactory();
    ObjectFactory<Person> personFactory = new PersonObjectFactory();
    ObjectFactory<String> doubleFactory = new DoubleAsStringObjectFactory();
    ObjectFactory<String> longFactory = new LongAsStringObjectFactory();
    ObjectFactory<byte[]> rawFactory = new RawObjectFactory();

    JedisConnectionFactory jedisConnFactory = new JedisConnectionFactory();
View Full Code Here

Examples of org.springframework.data.redis.PersonObjectFactory

    ObjectFactory<String> stringFactory = new StringObjectFactory();
    ObjectFactory<Long> longFactory = new LongObjectFactory();
    ObjectFactory<Double> doubleFactory = new DoubleObjectFactory();
    ObjectFactory<byte[]> rawFactory = new RawObjectFactory();
    ObjectFactory<Person> personFactory = new PersonObjectFactory();

    // XStream serializer
    XStreamMarshaller xstream = new XStreamMarshaller();
    try {
      xstream.afterPropertiesSet();
View Full Code Here

Examples of org.springframework.data.redis.PersonObjectFactory

public class PubSubTestParams {

  public static Collection<Object[]> testParams() {
    // create Jedis Factory
    ObjectFactory<String> stringFactory = new StringObjectFactory();
    ObjectFactory<Person> personFactory = new PersonObjectFactory();
    ObjectFactory<byte[]> rawFactory = new RawObjectFactory();

    JedisConnectionFactory jedisConnFactory = new JedisConnectionFactory();
    jedisConnFactory.setUsePool(true);
    jedisConnFactory.setPort(SettingsUtils.getPort());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.