Package org.springframework.cache.interceptor

Examples of org.springframework.cache.interceptor.SimpleKey


    this.keyGenerator.expect(1L);
    Object first = this.simpleService.get(1L);
    Object second = this.simpleService.get(1L);
    assertSame(first, second);

    Object key = new SimpleKey(1L);
    assertEquals(first, cache.get(key).get());
  }
View Full Code Here


    this.keyGenerator.expect(1L, "foo", "bar");
    Object first = this.simpleService.get(1L, "foo", "bar");
    Object second = this.simpleService.get(1L, "foo", "bar");
    assertSame(first, second);

    Object key = new SimpleKey(1L, "foo", "bar");
    assertEquals(first, cache.get(key).get());
  }
View Full Code Here

    this.keyGenerator.expect(1L);
    Object first = this.simpleService.getFiltered(1L, "foo", "bar");
    Object second = this.simpleService.getFiltered(1L, "foo", "bar");
    assertSame(first, second);

    Object key = new SimpleKey(1L);
    assertEquals(first, cache.get(key).get());
  }
View Full Code Here

    @Override
    public Object generate(Object target, Method method, Object... params) {
      assertTrue("Unexpected parameters: expected: "
              + Arrays.toString(this.expectedParams) + " but got: " + Arrays.toString(params),
          Arrays.equals(expectedParams, params));
      return new SimpleKey(params);
    }
View Full Code Here

TOP

Related Classes of org.springframework.cache.interceptor.SimpleKey

Copyright © 2018 www.massapicom. 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.