Este contenido no está disponible en el idioma seleccionado.

1.4. Placing and Retrieving Sets of Data


The AdvancedCache and RemoteCache interfaces include methods to either put or get a Map of existing data in bulk. These operations are typically much more efficient than an equivalent sequence of individual operations, especially when using them in server-client mode, as a single network operation occurs as opposed to multiple transactions.
When using the bulk operations the memory overhead is higher during the operation itself, as the get or put operation must accommodate for the full Map in a single execution.
The methods for each class are found below:
  • AdvancedCache:
    • Map<K,V> getAll(Set<?> keys) - returns a Map containing the values associated with the set of keys requested.
    • void putAll(Map<? extends K, ? extends V> map, Metadata metadata) - copies all of the mappings from the specified map to this cache, which takes an instance of Metadata to provide metadata information such as the lifespan, version, etc. on the entries being stored.
  • RemoteCache:
    • Map<K,V> getAll(Set<? extends K> keys) - returns a Map containing the values associated with the set of keys requested.
    • void putAll(Map<? extends K, ? extends V> map) - copies all of the mappings from the specified map to this cache.
    • void putAll(Map<? extends K, ? extends V> map, long lifespan, TimeUnit unit) - copies all of the mappings from the specified map to this cache, along with a lifespan before the entry is expired.
    • void putAll(Map<? extends K, ? extends V> map, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) - copies all of the mappings from the specified map to this cache, along with both a timespan before the entries are expired and the maximum amount of time the entry is allowed to be idle before it is considered to be expired.
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat