edu.ucsb.nceas.metacat.dataone.hazelcast

## Class SystemMetadataMap

- java.lang.Object
- - edu.ucsb.nceas.metacat.dataone.hazelcast.SystemMetadataMap

- All Implemented Interfaces:
    com.hazelcast.core.MapLoader<org.dataone.service.types.v1.Identifier,org.dataone.service.types.v2.SystemMetadata>, com.hazelcast.core.MapStore<org.dataone.service.types.v1.Identifier,org.dataone.service.types.v2.SystemMetadata>

      public class SystemMetadataMap
      extends java.lang.Object
      implements com.hazelcast.core.MapStore<org.dataone.service.types.v1.Identifier,org.dataone.service.types.v2.SystemMetadata>, com.hazelcast.core.MapLoader<org.dataone.service.types.v1.Identifier,org.dataone.service.types.v2.SystemMetadata>

  Storage implementation for Hazelcast System Metadata
  Author:
    leinfelder

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SystemMetadataMap()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `delete(org.dataone.service.types.v1.Identifier arg0)`
    `void` | `deleteAll(java.util.Collection<org.dataone.service.types.v1.Identifier> arg0)`
    `org.dataone.service.types.v2.SystemMetadata` | `load(org.dataone.service.types.v1.Identifier pid)`
    `java.util.Map<org.dataone.service.types.v1.Identifier,org.dataone.service.types.v2.SystemMetadata>` | `loadAll(java.util.Collection<org.dataone.service.types.v1.Identifier> keys)`
    `java.util.Set<org.dataone.service.types.v1.Identifier>` | `loadAllKeys()` Returning null so that no entries are loaded on map initialization
    `void` | `store(org.dataone.service.types.v1.Identifier pid, org.dataone.service.types.v2.SystemMetadata sm)`
    `void` | `storeAll(java.util.Map<org.dataone.service.types.v1.Identifier,org.dataone.service.types.v2.SystemMetadata> map)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SystemMetadataMap

          public SystemMetadataMap()

  - ### Method Detail

    - #### delete

          public void delete(org.dataone.service.types.v1.Identifier arg0)

      Specified by:
        `delete` in interface `com.hazelcast.core.MapStore<org.dataone.service.types.v1.Identifier,org.dataone.service.types.v2.SystemMetadata>`

    - #### deleteAll

          public void deleteAll(java.util.Collection<org.dataone.service.types.v1.Identifier> arg0)

      Specified by:
        `deleteAll` in interface `com.hazelcast.core.MapStore<org.dataone.service.types.v1.Identifier,org.dataone.service.types.v2.SystemMetadata>`

    - #### store

          public void store(org.dataone.service.types.v1.Identifier pid,
                            org.dataone.service.types.v2.SystemMetadata sm)

      Specified by:
        `store` in interface `com.hazelcast.core.MapStore<org.dataone.service.types.v1.Identifier,org.dataone.service.types.v2.SystemMetadata>`

    - #### storeAll

          public void storeAll(java.util.Map<org.dataone.service.types.v1.Identifier,org.dataone.service.types.v2.SystemMetadata> map)

      Specified by:
        `storeAll` in interface `com.hazelcast.core.MapStore<org.dataone.service.types.v1.Identifier,org.dataone.service.types.v2.SystemMetadata>`

    - #### load

          public org.dataone.service.types.v2.SystemMetadata load(org.dataone.service.types.v1.Identifier pid)

      Specified by:
        `load` in interface `com.hazelcast.core.MapLoader<org.dataone.service.types.v1.Identifier,org.dataone.service.types.v2.SystemMetadata>`

    - #### loadAll

          public java.util.Map<org.dataone.service.types.v1.Identifier,org.dataone.service.types.v2.SystemMetadata> loadAll(java.util.Collection<org.dataone.service.types.v1.Identifier> keys)

      Specified by:
        `loadAll` in interface `com.hazelcast.core.MapLoader<org.dataone.service.types.v1.Identifier,org.dataone.service.types.v2.SystemMetadata>`

    - #### loadAllKeys

          public java.util.Set<org.dataone.service.types.v1.Identifier> loadAllKeys()

      Returning null so that no entries are loaded on map initialization
      Specified by:
        `loadAllKeys` in interface `com.hazelcast.core.MapLoader<org.dataone.service.types.v1.Identifier,org.dataone.service.types.v2.SystemMetadata>`
      See Also:
        `As of 1.9.3 MapLoader has the new MapLoader.loadAllKeys API. It is used for pre-populating the in-memory map when the map is first touched/used. If MapLoader.loadAllKeys returns NULL then nothing will be loaded. Your MapLoader.loadAllKeys implementation can return all or some of the keys. You may select and return only the hot keys, for instance. Also note that this is the fastest way of pre-populating the map as Hazelcast will optimize the loading process by having each node loading owned portion of the entries.`

Copyright © 2023 Regents of the University of California. All Rights Reserved.