[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Interface DataStore<V> (2.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0 (latest)](/java/docs/reference/google-http-client/latest/com.google.api.client.util.store.DataStore)\n- [1.47.1](/java/docs/reference/google-http-client/1.47.1/com.google.api.client.util.store.DataStore)\n- [1.46.3](/java/docs/reference/google-http-client/1.46.3/com.google.api.client.util.store.DataStore)\n- [1.45.3](/java/docs/reference/google-http-client/1.45.3/com.google.api.client.util.store.DataStore)\n- [1.44.2](/java/docs/reference/google-http-client/1.44.2/com.google.api.client.util.store.DataStore)\n- [1.43.2](/java/docs/reference/google-http-client/1.43.2/com.google.api.client.util.store.DataStore)\n- [1.42.3](/java/docs/reference/google-http-client/1.42.3/com.google.api.client.util.store.DataStore)\n- [1.41.8](/java/docs/reference/google-http-client/1.41.8/com.google.api.client.util.store.DataStore) \n\n public interface DataStore\u003cV\u003e\n\nStores and manages serializable data of a specific type, where the key is a string and the value\nis a [Serializable](https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html) object.\n\n`null` keys or values are not allowed. Implementation should be thread-safe.\n\nMethods\n-------\n\n### clear()\n\n public abstract DataStore\u003cV\u003e clear()\n\nDeletes all of the stored keys and values.\n\n### containsKey(String key)\n\n public abstract boolean containsKey(String key)\n\nReturns whether the store contains the given key.\n\n### containsValue(V value)\n\n public abstract boolean containsValue(V value)\n\nReturns whether the store contains the given value.\n\n### delete(String key)\n\n public abstract DataStore\u003cV\u003e delete(String key)\n\nDeletes the stored key and value based on the given key, or ignored if the key doesn't already\nexist.\n\n### get(String key)\n\n public abstract V get(String key)\n\nReturns the stored value for the given key or `null` if not found.\n\n### getDataStoreFactory()\n\n public abstract DataStoreFactory getDataStoreFactory()\n\nReturns the data store factory.\n\n### getId()\n\n public abstract String getId()\n\nReturns the data store ID.\n\n### isEmpty()\n\n public abstract boolean isEmpty()\n\nReturns whether there are any stored keys.\n\n### keySet()\n\n public abstract Set\u003cString\u003e keySet()\n\nReturns the unmodifiable set of all stored keys.\n\nOrder of the keys is not specified.\n\n### set(String key, V value)\n\n public abstract DataStore\u003cV\u003e set(String key, V value)\n\nStores the given value for the given key (replacing any existing value).\n\n### size()\n\n public abstract int size()\n\nReturns the number of stored keys.\n\n### values()\n\n public abstract Collection\u003cV\u003e values()\n\nReturns the unmodifiable collection of all stored values."]]