Browse Source

Merge branch '5.1.x'

pull/23195/head
Sam Brannen 7 years ago
parent
commit
e947e08638
  1. 15
      spring-context/src/main/java/org/springframework/cache/CacheManager.java

15
spring-context/src/main/java/org/springframework/cache/CacheManager.java vendored

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2014 the original author or authors. * Copyright 2002-2019 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -22,23 +22,28 @@ import org.springframework.lang.Nullable;
/** /**
* Spring's central cache manager SPI. * Spring's central cache manager SPI.
* Allows for retrieving named {@link Cache} regions. *
* <p>Allows for retrieving named {@link Cache} regions.
* *
* @author Costin Leau * @author Costin Leau
* @author Sam Brannen
* @since 3.1 * @since 3.1
*/ */
public interface CacheManager { public interface CacheManager {
/** /**
* Return the cache associated with the given name. * Get the cache associated with the given name.
* <p>Note that the cache may be created at runtime if the native provider
* supports it.
* @param name the cache identifier (must not be {@code null}) * @param name the cache identifier (must not be {@code null})
* @return the associated cache, or {@code null} if none found * @return the associated cache, or {@code null} if such a cache does not
* exist or could be not created
*/ */
@Nullable @Nullable
Cache getCache(String name); Cache getCache(String name);
/** /**
* Return a collection of the cache names known by this manager. * Get a collection of the cache names known by this manager.
* @return the names of all caches known by the cache manager * @return the names of all caches known by the cache manager
*/ */
Collection<String> getCacheNames(); Collection<String> getCacheNames();

Loading…
Cancel
Save