This project is read-only.
IOG may store the data on any storage which implements the IKeyValueStorage<Guid, object>:
    /// <summary>
    /// Generic key,value storage
    /// </summary>
    /// <typeparam name="TKey">Type for key</typeparam>
    /// <typeparam name="TValue">Type for data</typeparam>
    public interface IKeyValueStorage<TKey, TValue>
    {
        /// <summary>
        /// Adds or updates value in the storage
        /// </summary>
        /// <param name="key">Key which identifies the data</param>
        /// <param name="value">Data to store</param>
        /// <returns>True if operation was success</returns>
        bool AddOrUpdate(TKey key, TValue value);

        /// <summary>
        /// Reads data from storage
        /// </summary>
        /// <param name="key">Key which identifies the data</param>
        /// <returns>Storage data</returns>
        TValue Value(TKey key);

        /// <summary>
        /// Removes data from storage
        /// </summary>
        /// <param name="key">Key which identifies the data</param>
        /// <returns>True if data was present in the storage</returns>
        bool Remove(TKey key);

        /// <summary>
        /// Determines if data is present in the storage
        /// </summary>
        /// <param name="key">Key which identifies the data</param>
        /// <returns>True if data is present</returns>
        bool Contains(TKey key);

        /// <summary>
        /// Returns the keys
        /// </summary>
        /// <returns>List of keys in the storage</returns>
        IEnumerable<TKey> ListKeys();

        /// <summary>
        /// Clears all data in the storage
        /// </summary>
        void Clear();
    }


Storage is passed as argument when creating Context, attaching the storage to context and making the data in storage available for reading and modification.

Following storage implementations are available:
  • Memory only
  • IndexedFileStorage for storing data in flat file
  • AquilesStorage for Apache Cassandra support
  • Additional adapters to 3rd party key-value compatible storage implementations can be easily developed

Last edited Mar 23, 2012 at 4:47 PM by nenadsabo, version 3

Comments

No comments yet.