Class JdoDataStoreFactory.JdoDataStore<V extends java.io.Serializable>

    • Field Detail

      • lock

        private final java.util.concurrent.locks.Lock lock
        Lock on storing, loading and deleting a credential.
      • persistenceManagerFactory

        private final javax.jdo.PersistenceManagerFactory persistenceManagerFactory
        Persistence manager factory.
    • Constructor Detail

      • JdoDataStore

        JdoDataStore​(JdoDataStoreFactory dataStore,
                     javax.jdo.PersistenceManagerFactory persistenceManagerFactory,
                     java.lang.String id)
    • Method Detail

      • keySet

        public java.util.Set<java.lang.String> keySet()
                                               throws java.io.IOException
        Description copied from interface: DataStore
        Returns the unmodifiable set of all stored keys.

        Order of the keys is not specified.

        Throws:
        java.io.IOException
      • values

        public java.util.Collection<V> values()
                                       throws java.io.IOException
        Description copied from interface: DataStore
        Returns the unmodifiable collection of all stored values.
        Throws:
        java.io.IOException
      • get

        public V get​(java.lang.String key)
              throws java.io.IOException
        Description copied from interface: DataStore
        Returns the stored value for the given key or null if not found.
        Parameters:
        key - key or null for null result
        Throws:
        java.io.IOException
      • set

        public JdoDataStoreFactory.JdoDataStore<V> set​(java.lang.String key,
                                                       V value)
                                                throws java.io.IOException
        Description copied from interface: DataStore
        Stores the given value for the given key (replacing any existing value).
        Parameters:
        key - key
        value - value object
        Throws:
        java.io.IOException
      • delete

        public DataStore<V> delete​(java.lang.String key)
                            throws java.io.IOException
        Description copied from interface: DataStore
        Deletes the stored key and value based on the given key, or ignored if the key doesn't already exist.
        Parameters:
        key - key or null to ignore
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • newAllKeysQuery

        javax.jdo.Query newAllKeysQuery​(javax.jdo.PersistenceManager persistenceManager)
        Returns a new query for all keys.
        Parameters:
        persistenceManager - persistence manager
        Returns:
        new query for all keys
      • executeAllKeysQuery

        java.util.Collection<JdoDataStoreFactory.JdoValue> executeAllKeysQuery​(javax.jdo.Query allKeysQuery)
        Executes the query for all keys.
        Parameters:
        allKeysQuery - query for all keys
        Returns:
        query result
      • newKeyQuery

        javax.jdo.Query newKeyQuery​(javax.jdo.PersistenceManager persistenceManager)
        Returns a new query for a given key.
        Parameters:
        persistenceManager - persistence manager
        Returns:
        new new query for a given key