Package com.linkedin.venice.persona
Class StoragePersonaAccessor
- java.lang.Object
-
- com.linkedin.venice.persona.StoragePersonaAccessor
-
public class StoragePersonaAccessor extends java.lang.Object
Zookeeper accessor forStoragePersona
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 Summary
Fields Modifier and Type Field Description static java.lang.String
STORAGE_PERSONA_SUB_PATH
-
Constructor Summary
Constructors Constructor Description StoragePersonaAccessor(java.lang.String clusterName, HelixAdapterSerializer adapter, org.apache.helix.zookeeper.impl.client.ZkClient zkClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsPersona(java.lang.String name)
void
createPersona(StoragePersona persona)
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.void
deletePersona(StoragePersona persona)
void
deletePersona(java.lang.String personaName)
java.util.List<StoragePersona>
getAllPersonasFromZk()
StoragePersona
getPersonaFromZk(java.lang.String name)
void
updatePersona(StoragePersona persona)
-
-
-
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()
-
-