package com.hpe.caf.api.worker;


import com.hpe.caf.api.HealthReporter;

import java.io.InputStream;


/**
 * A representation of a generic data store, for reading and writing data
 * typically used by workers in the course of their computation.
 */
public abstract class DataStore implements HealthReporter
{
    /**
     * Perform necessary shut down operations.
     */
    public abstract void shutdown();


    /**
     * Get data by reference
     * @param reference the arbitrary string reference to a piece of data
     * @return the raw data referred to
     * @throws DataStoreException if the data store cannot service the request
     */
    public abstract InputStream getData(final String reference)
        throws DataStoreException;


    /**
     * Store data by reference
     * @param reference the arbitrary string reference to store the data by
     * @param data the raw data to store
     * @return reference to the stored data, which can be used to retrieve
     * @throws DataStoreException if the data store cannot service the request
     */
    public abstract String putData(final String reference, final InputStream data)
        throws DataStoreException;


    /**
     * @return metrics for the data store
     */
    public abstract DataStoreMetricsReporter getMetrics();
}

@@ -308,110 +308,8 @@
 r%0A%7B%0A
-    /**%0A     * Perform necessary shut down operations.%0A     */%0A    public abstract void shutdown();%0A%0A%0A
     
@@ -635,32 +635,550 @@
 oreException;%0A%0A%0A
+    /**%0A     * Get the byte size of some data in the DataStore by reference%0A     * @param reference the arbitrary string reference to a piece of data%0A     * @return the size in bytes of the data being referred to%0A     * @throws DataStoreException if the data store cannot service the requeste%0A     */%0A    public abstract long getDataSize(final String reference)%0A        throws DataStoreException;%0A%0A%0A    /**%0A     * @return metrics for the data store%0A     */%0A    public abstract DataStoreMetricsReporter getMetrics();%0A%0A%0A
     /**%0A     * S
@@ -1618,106 +1618,89 @@
   * 
-@return metrics for the data store%0A     */%0A    public abstract DataStoreMetricsReporter getMetrics
+Perform necessary shut down operations.%0A     */%0A    public abstract void shutdown
 ();%0A

Add getDataSize to DataStore api