Class StoragePersonaAccessor


  • public class StoragePersonaAccessor
    extends java.lang.Object
    Zookeeper accessor for StoragePersona objects, allowing for read/write to persona paths.

    The data structure on ZK would be: /Persona/StoragePersona/$name, where $name is specified at creation. Nothing in the accessor is cached locally.

    • Field Detail

      • STORAGE_PERSONA_SUB_PATH

        public static final java.lang.String STORAGE_PERSONA_SUB_PATH
        See Also:
        Constant Field Values
    • Constructor Detail

      • StoragePersonaAccessor

        public StoragePersonaAccessor​(java.lang.String clusterName,
                                      HelixAdapterSerializer adapter,
                                      org.apache.helix.zookeeper.impl.client.ZkClient zkClient)
    • Method Detail

      • createPersona

        public void createPersona​(java.lang.String name,
                                  long quotaNumber,
                                  java.util.Set<java.lang.String> storesToEnforce,
                                  java.util.Set<java.lang.String> owners)
        Note that this method does not return an error if the persona already exists. It is up to the caller, i.e. StoragePersonaRepository to throw an error in this case.
      • createPersona

        public void createPersona​(StoragePersona persona)
      • updatePersona

        public void updatePersona​(StoragePersona persona)
      • deletePersona

        public void deletePersona​(StoragePersona persona)
      • deletePersona

        public void deletePersona​(java.lang.String personaName)
      • containsPersona

        public boolean containsPersona​(java.lang.String name)
      • getPersonaFromZk

        public StoragePersona getPersonaFromZk​(java.lang.String name)
      • getAllPersonasFromZk

        public java.util.List<StoragePersona> getAllPersonasFromZk()