You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by rv...@apache.org on 2015/04/28 23:40:30 UTC

[25/51] [partial] incubator-geode git commit: Init

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19459053/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CacheTransactionManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CacheTransactionManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CacheTransactionManager.java
new file mode 100644
index 0000000..0c666fa
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CacheTransactionManager.java
@@ -0,0 +1,322 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *========================================================================
+ */
+
+package com.gemstone.gemfire.cache;
+
+import java.util.concurrent.TimeUnit;
+
+
+/** <p>The CacheTransactionManager interface allows applications to manage
+ * transactions on a per {@link Cache} basis.  
+ * 
+ * <p>The life cycle of a GemFire transaction starts with a begin
+ * operation. The life cycle ends with either a commit or rollback
+ * operation.  Between the begin and the commit/rollback are typically
+ * {@link Region} operations.  In general, those that either create,
+ * destroy, invalidate or update {@link Region.Entry} are considered
+ * transactional, that is they modify transactional state.
+ * 
+ * <p>A GemFire transaction may involve operations on multiple regions,
+ * each of which may have different attributes.
+ * 
+ * <p>While a GemFire transaction and its operations are invoked in
+ * the local VM, the resulting transaction state is distributed to
+ * other VM's at commit time as per the attributes of each
+ * participant Region.
+ * 
+ * <p>A transaction can have no more than one thread associated with
+ * it and conversely a thread can only operate on one transaction at
+ * any given time. Child threads will not inherit the existing
+ * transaction.
+ *
+ * <p>Each of the following methods operate on the current thread.  All
+ * methods throw {@link CacheClosedException} if the Cache is closed.
+ * 
+ * <p>GemFire Transactions currently only support Read Committed
+ * isolation.  In addition, they are optimistic transactions in that
+ * write locking and conflict checks are performed as part of the
+ * commit operation.
+ *
+ * <p>For guaranteed Read Committed isolation, avoid making "in place"
+ * changes, because such changes will be "seen" by other transactions
+ * and break the Read Committed isolation guarantee. e.g.
+ *
+ *  <pre>
+ *    CacheTransactionManager txMgr = cache.getCacheTransactionManager();
+ *    txMgr.begin();
+ *    StringBuffer s = (StringBuffer) r.get("stringBuf");
+ *    s.append("Changes seen before commit. NOT Read Committed!");
+ *    r.put("stringBuf", s);
+ *    txMgr.commit();
+ *  </pre>
+ * 
+ *  <p>To aid in creating copies, the "copy on read"
+ *  <code>Cache</code> attribute and the {@link
+ *  com.gemstone.gemfire.CopyHelper#copy} method are provided.
+ *  The following is a Read Committed safe example using the
+ *  <code>CopyHelper.copy</code> method.
+ * 
+ *  <pre>
+ *    CacheTransactionManager txMgr = cache.getCacheTransactionManager();
+ *    txMgr.begin();
+ *    Object o = r.get("stringBuf");
+ *    StringBuffer s = (StringBuffer) CopyHelper.copy(o);
+ *    s.append("Changes unseen before commit. Read Committed.");
+ *    r.put("stringBuf", s);
+ *    txMgr.commit();
+ *  </pre>
+ *
+ *  <p>Its important to note that creating copies can negatively
+ *  impact both performance and memory consumption.
+ *
+ * <p>Partitioned Regions, Distributed No Ack and Distributed Ack Regions are supported
+ * (see {@link AttributesFactory} for Scope).  For both scopes, a
+ * consistent configuration (per VM) is enforced.
+ * 
+ * <p>Global Regions, client Regions (see {@link com.gemstone.gemfire.cache.client})
+ * and persistent Regions (see {@link DiskWriteAttributes}) do not
+ * support transactions.
+ * 
+ * <p>When PartitionedRegions are involved in a transaction, all data in the 
+ * transaction must be colocated together on one data node. See the GemFire 
+ * Developer Guide for details on using transactions with Partitioned Regions.
+ * 
+ * @author Mitch Thomas
+ * 
+ * @since 4.0
+ * 
+ * @see Cache
+ * 
+ */
+public interface CacheTransactionManager {
+    /** Creates a new transaction and associates it with the current thread.
+     *
+     * @throws IllegalStateException if the thread is already associated with a transaction
+     *
+     * @since 4.0
+     */
+    public void begin();
+
+    /** Commit the transaction associated with the current thread. If
+     *  the commit operation fails due to a conflict it will destroy
+     *  the transaction state and throw a {@link
+     *  CommitConflictException}.  If the commit operation succeeds,
+     *  it returns after the transaction state has been merged with
+     *  committed state.  When this method completes, the thread is no
+     *  longer associated with a transaction.
+     *
+     * @throws IllegalStateException if the thread is not associated with a transaction
+     * 
+     * @throws CommitConflictException if the commit operation fails due to
+     *   a write conflict.
+     * 
+     * @throws TransactionDataNodeHasDepartedException if the node hosting the
+     * transaction data has departed. This is only relevant for transaction that
+     * involve PartitionedRegions.
+     * 
+     * @throws TransactionDataNotColocatedException if at commit time, the data
+     * involved in the transaction has moved away from the transaction hosting 
+     * node. This can only happen if rebalancing/recovery happens during a 
+     * transaction that involves a PartitionedRegion. 
+     *   
+     * @throws TransactionInDoubtException when GemFire cannot tell which nodes
+     * have applied the transaction and which have not. This only occurs if nodes
+     * fail mid-commit, and only then in very rare circumstances.
+     */
+    public void commit() throws CommitConflictException;
+
+    /** Roll back the transaction associated with the current thread. When
+     *  this method completes, the thread is no longer associated with a
+     *  transaction and the transaction context is destroyed.
+     *
+     * @since 4.0
+     * 
+     * @throws IllegalStateException if the thread is not associated with a transaction
+     */
+    public void rollback();
+
+  /**
+   * Suspends the transaction on the current thread. All subsequent operations
+   * performed by this thread will be non-transactional. The suspended
+   * transaction can be resumed by calling {@link #resume(TransactionId)}
+   * 
+   * @return the transaction identifier of the suspended transaction or null if
+   *         the thread was not associated with a transaction
+   * @since 6.6.2
+   */
+  public TransactionId suspend();
+
+  /**
+   * On the current thread, resumes a transaction that was previously suspended
+   * using {@link #suspend()}
+   * 
+   * @param transactionId
+   *          the transaction to resume
+   * @throws IllegalStateException
+   *           if the thread is associated with a transaction or if
+   *           {@link #isSuspended(TransactionId)} would return false for the
+   *           given transactionId
+   * @since 6.6.2
+   * @see #tryResume(TransactionId)
+   */
+  public void resume(TransactionId transactionId);
+
+  /**
+   * This method can be used to determine if a transaction with the given
+   * transaction identifier is currently suspended locally. This method does not
+   * check other members for transaction status.
+   * 
+   * @param transactionId
+   * @return true if the transaction is in suspended state, false otherwise
+   * @since 6.6.2
+   * @see #exists(TransactionId)
+   */
+  public boolean isSuspended(TransactionId transactionId);
+
+  /**
+   * On the current thread, resumes a transaction that was previously suspended
+   * using {@link #suspend()}.
+   * 
+   * This method is equivalent to
+   * <pre>
+   * if (isSuspended(txId)) {
+   *   resume(txId);
+   * }
+   * </pre>
+   * except that this action is performed atomically
+   * 
+   * @param transactionId
+   *          the transaction to resume
+   * @return true if the transaction was resumed, false otherwise
+   * @since 6.6.2
+   */
+  public boolean tryResume(TransactionId transactionId);
+
+  /**
+   * On the current thread, resumes a transaction that was previously suspended
+   * using {@link #suspend()}, or waits for the specified timeout interval if
+   * the transaction has not been suspended. This method will return if:
+   * <ul>
+   * <li>Another thread suspends the transaction</li>
+   * <li>Another thread calls commit/rollback on the transaction</li>
+   * <li>This thread has waited for the specified timeout</li>
+   * </ul>
+   * 
+   * This method returns immediately if {@link #exists(TransactionId)} returns false.
+   * 
+   * @param transactionId
+   *          the transaction to resume
+   * @param time
+   *          the maximum time to wait
+   * @param unit
+   *          the time unit of the <code>time</code> argument
+   * @return true if the transaction was resumed, false otherwise
+   * @since 6.6.2
+   * @see #tryResume(TransactionId)
+   */
+  public boolean tryResume(TransactionId transactionId, long time, TimeUnit unit);
+
+  /**
+   * Reports the existence of a transaction for the given transactionId. This
+   * method can be used to determine if a transaction with the given transaction
+   * identifier is currently in progress locally.
+   * 
+   * @param transactionId
+   *          the given transaction identifier
+   * @return true if the transaction is in progress, false otherwise.
+   * @since 6.6.2
+   * @see #isSuspended(TransactionId)
+   */
+  public boolean exists(TransactionId transactionId);
+  
+    /** Reports the existence of a Transaction for this thread
+     *
+     * @return true if a transaction exists, false otherwise
+     *
+     * @since 4.0
+     */
+    public boolean exists();
+
+    /** Returns the transaction identifier for the current thread
+     *
+     * @return the transaction identifier or null if no transaction exists
+     *
+     * @since 4.0
+     */
+    public TransactionId getTransactionId();
+
+    /**
+     * Gets the transaction listener for this Cache.
+     *
+     * @return The TransactionListener instance or null if no listener.
+     * @throws IllegalStateException if more than one listener exists on this cache
+     * @deprecated as of GemFire 5.0, use {@link #getListeners} instead
+     */
+    @Deprecated
+    public TransactionListener getListener();
+
+    /** Returns an array of all the transaction listeners on this cache.
+     * Modifications to the returned array will not effect what listeners are on this cache.
+     * @return the cache's <code>TransactionListener</code>s; an empty array if no listeners
+     * @since 5.0
+     */
+    public TransactionListener[] getListeners();
+
+    /**
+     * Sets the transaction listener for this Cache.
+     *
+     * @param newListener the TransactionListener to register with the Cache.
+     *   Use a <code>null</code> to deregister the current listener without
+     *   registering a new one.
+     * @return the previous TransactionListener
+     * @throws IllegalStateException if more than one listener exists on this cache
+     * @deprecated as of GemFire 5.0, use {@link #addListener} or {@link #initListeners} instead.
+     */
+    @Deprecated
+    public TransactionListener setListener(TransactionListener newListener);
+    /**
+     * Adds a transaction listener to the end of the list of transaction listeners on this cache.
+     * @param aListener the user defined transaction listener to add to the cache.
+     * @throws IllegalArgumentException if <code>aListener</code> is null
+     * @since 5.0
+     */
+    public void addListener(TransactionListener aListener);
+    /**
+     * Removes a transaction listener from the list of transaction listeners on this cache.
+     * Does nothing if the specified listener has not been added.
+     * If the specified listener has been added then {@link CacheCallback#close} will
+     * be called on it; otherwise does nothing.
+     * @param aListener the transaction listener to remove from the cache.
+     * @throws IllegalArgumentException if <code>aListener</code> is null
+     * @since 5.0
+     */
+    public void removeListener(TransactionListener aListener);
+    /**
+     * Removes all transaction listeners, calling {@link CacheCallback#close} on each of them, and then adds each listener in the specified array.
+     * @param newListeners a possibly null or empty array of listeners to add to this cache.
+     * @throws IllegalArgumentException if the <code>newListeners</code> array has a null element
+     * @since 5.0
+     */
+    public void initListeners(TransactionListener[] newListeners);
+
+    /**
+     * Set the TransactionWriter for the cache
+     * @param writer
+     * @see TransactionWriter
+     * @since 6.5
+     */
+    public void setWriter(TransactionWriter writer);
+
+    /**
+     * Returns the current {@link TransactionWriter}
+     * @see CacheTransactionManager#setWriter(TransactionWriter)
+     * @return the current {@link TransactionWriter}
+     * @since 6.5
+     */
+    public TransactionWriter getWriter();
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19459053/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CacheWriter.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CacheWriter.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CacheWriter.java
new file mode 100644
index 0000000..5f3ca0c
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CacheWriter.java
@@ -0,0 +1,142 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *========================================================================
+ */
+
+package com.gemstone.gemfire.cache;
+
+/** A user-defined object defined in the {@link RegionAttributes} that is
+ * called synchronously before a region or entry in the cache is
+ * modified. The typical use for a <code>CacheWriter</code> is to update a database.
+ * Application writers should implement these methods to execute
+ * application-specific behavior before the cache is modified.
+ *
+ * <p>Before the region is updated via a put, create, or destroy operation,
+ * GemFire will call a <code>CacheWriter</code> that is installed anywhere in any
+ * participating cache for that region, preferring a local <code>CacheWriter</code>
+ * if there is one. Usually there will be only one <code>CacheWriter</code> in
+ * the distributed system. If there are multiple <code>CacheWriter</code>s
+ * available in the distributed system, the GemFire
+ * implementation always prefers one that is stored locally, or else picks one
+ * arbitrarily; in any case only one <code>CacheWriter</code> will be invoked.
+ *
+ * <p>The <code>CacheWriter</code> is capable of aborting the update to the cache by throwing
+ * a <code>CacheWriterException</code>. This exception or any runtime exception
+ * thrown by the <code>CacheWriter</code> will abort the operation and the
+ * exception will be propagated to the initiator of the operation, regardless
+ * of whether the initiator is in the same VM as the <code>CacheWriter</code>.
+ *
+ * @author Eric Zoerner
+ *
+ * @see AttributesFactory#setCacheWriter
+ * @see RegionAttributes#getCacheWriter
+ * @see AttributesMutator#setCacheWriter
+ * @since 3.0
+ */
+public interface CacheWriter<K,V> extends CacheCallback {
+
+  /**
+   * Called before an entry is updated. The entry update is initiated by a <code>put</code>
+   * or a <code>get</code> that causes the loader to update an existing entry.
+   * The entry previously existed in the cache where the operation was
+   * initiated, although the old value may have been null. The entry being
+   * updated may or may not exist in the local cache where the CacheWriter is
+   * installed.
+   *
+   * @param event an EntryEvent that provides information about the operation in progress
+   * @throws CacheWriterException if thrown will abort the operation in progress,
+   *         and the exception will be propagated back to caller that initiated
+   *         the operation
+   * @see Region#put(Object, Object)
+   * @see Region#get(Object)
+   */
+  public void beforeUpdate(EntryEvent<K,V> event)
+  throws CacheWriterException;
+
+  /** Called before an entry is created. Entry creation is initiated by a
+   * <code>create</code>, a <code>put</code>, or a <code>get</code>.
+   * The <code>CacheWriter</code> can determine whether this value comes from a
+   * <code>get</code> or not by evaluating the {@link CacheEvent#getOperation() Operation}'s {@link Operation#isLoad()} method.
+   * The entry being created may already exist in the local cache where this <code>CacheWriter</code>
+   * is installed, but it does not yet exist in the cache where the operation was initiated.
+   * @param event an EntryEvent that provides information about the operation in progress
+   * @throws CacheWriterException if thrown will abort the operation in progress,
+   *         and the exception will be propagated back to caller that initiated
+   *         the operation
+   * @see Region#create(Object, Object)
+   * @see Region#put(Object, Object)
+   * @see Region#get(Object)
+   */
+  public void beforeCreate(EntryEvent<K,V> event)
+  throws CacheWriterException;
+
+  /**
+   * Called before an entry is destroyed. The entry being destroyed may or may
+   * not exist in the local cache where the CacheWriter is installed. This method
+   * is <em>not</em> called as a result of expiration or 
+   * {@link Region#localDestroy(Object)}.
+   *
+   * @param event an EntryEvent that provides information about the operation in progress
+   * @throws CacheWriterException if thrown will abort the operation in progress,
+   *         and the exception will be propagated back to caller that initiated
+   *         the operation
+   *
+   * @see Region#destroy(Object)
+   */
+  public void beforeDestroy(EntryEvent<K,V> event)
+  throws CacheWriterException;
+
+  /**
+   * Called before a region is destroyed. The <code>CacheWriter</code>
+   * will not additionally be called for each entry that is destroyed
+   * in the region as a result of a region destroy. If the region's
+   * subregions have <code>CacheWriter</code>s installed, then they
+   * will be called for the cascading subregion destroys.
+   * This method is <em>not</em> called as a result of
+   * {@link Region#close}, {@link Cache#close}, or {@link Region#localDestroyRegion()}.  However, the
+   * {@link Region#close} method is invoked regardless of whether a
+   * region is destroyed locally.  A non-local region destroy results
+   * in an invocation of {@link #beforeRegionDestroy} followed by an
+   * invocation of {@link Region#close}.
+   *<p>
+   * WARNING: This method should not destroy or create any regions itself or a
+   * deadlock will occur.
+   *
+   * @param event
+   *        a RegionEvent that provides information about the operation
+   *
+   * @throws CacheWriterException
+   *         if thrown, will abort the operation in progress, and the
+   *         exception will be propagated back to the caller that
+   *         initiated the operation
+   *
+   * @see Region#destroyRegion()
+   */
+  public void beforeRegionDestroy(RegionEvent<K,V> event)
+  throws CacheWriterException;
+
+  /**
+   * Called before a region is cleared. The <code>CacheWriter</code>
+   * will not additionally be called for each entry that is cleared
+   * in the region as a result of a region clear. 
+   * 
+   *<p>
+   * WARNING: This method should not clear/destroy any regions 
+   * 
+   *
+   * @param event
+   *        a RegionEvent that provides information about the operation
+   *
+   * @throws CacheWriterException
+   *         if thrown, will abort the operation in progress, and the
+   *         exception will be propagated back to the caller that
+   *         initiated the operation
+   *
+   * @see Region#clear
+   */
+  public void beforeRegionClear(RegionEvent<K,V> event)
+  throws CacheWriterException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19459053/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CacheWriterException.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CacheWriterException.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CacheWriterException.java
new file mode 100644
index 0000000..11437c1
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CacheWriterException.java
@@ -0,0 +1,61 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *========================================================================
+ */
+
+package com.gemstone.gemfire.cache;
+
+/**
+ * An exception thrown by a <code>CacheWriter</code> method. This exception
+ * is propagated back to the caller that initiated modification of the
+ * cache, even if the caller is not in the same cache VM.
+ *
+ * @author Eric Zoerner
+ *
+ * @see CacheWriter
+ * @see com.gemstone.gemfire.cache.Region#put(Object, Object)
+ * @see com.gemstone.gemfire.cache.Region#destroy(Object)
+ * @see com.gemstone.gemfire.cache.Region#create(Object, Object)
+ * @see com.gemstone.gemfire.cache.Region#destroyRegion()
+ * @see com.gemstone.gemfire.cache.Region#get(Object)
+ * @since 3.0
+ */
+public class CacheWriterException extends OperationAbortedException {
+private static final long serialVersionUID = -2872212342970454458L;
+  
+  /**
+   * Creates a new instance of <code>CacheWriterException</code>.
+   */
+  public CacheWriterException() {
+  }
+  
+  
+  /**
+   * Constructs an instance of <code>CacheWriterException</code> with the specified detail message.
+   * @param msg the detail message
+   */
+  public CacheWriterException(String msg) {
+    super(msg);
+  }
+  
+  /**
+   * Constructs an instance of <code>CacheWriterException</code> with the specified detail message
+   * and cause.
+   * @param msg the detail message
+   * @param cause the causal Throwable
+   */
+  public CacheWriterException(String msg, Throwable cause) {
+    super(msg, cause);
+  }
+  
+  /**
+   * Constructs an instance of <code>CacheWriterException</code> with the specified cause.
+   * @param cause the causal Throwable
+   */
+  public CacheWriterException(Throwable cause) {
+    super(cause);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19459053/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CacheXmlException.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CacheXmlException.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CacheXmlException.java
new file mode 100644
index 0000000..a88c5ff
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CacheXmlException.java
@@ -0,0 +1,41 @@
+/*=========================================================================
+ * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.gemstone.gemfire.cache;
+
+/**
+ * Thrown when a problem is encountered while parsing a <A
+ * href="package-summary.html#declarative">declarative caching XML
+ * file</A>.  Examples of such problems are a malformed XML file or
+ * the inability to load a {@link Declarable} class.
+ *
+ * @see CacheFactory#create
+ *
+ * @author David Whitlock
+ *
+ * @since 3.0
+ */
+public class CacheXmlException extends CacheRuntimeException {
+private static final long serialVersionUID = -4343870964883131754L;
+
+  /**
+   * Creates a new <code>CacheXmlException</code> with the given
+   * description and cause.
+   */
+  public CacheXmlException(String message, Throwable cause) {
+    super(message, cause);
+  }
+
+  /**
+   * Creates a new <code>CacheXmlException</code> with the given
+   * description.
+   */
+  public CacheXmlException(String message) {
+    super(message);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19459053/gemfire-core/src/main/java/com/gemstone/gemfire/cache/ClientSession.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/ClientSession.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/ClientSession.java
new file mode 100755
index 0000000..cea178f
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/ClientSession.java
@@ -0,0 +1,189 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *========================================================================
+ */
+
+package com.gemstone.gemfire.cache;
+
+/**
+ * Class <code>ClientSession</code> represents a client connection on the
+ * server. <code>ClientSessions</code> can be used from the cache server to
+ * perform interest registrations and unregistrations on behalf of clients.
+ * <code>ClientSessions</code> are only available on the cache server.
+ * 
+ * <p>
+ * The ClientSession is often used in conjunction with a callback
+ * <code>EntryEvent</code> as shown below.
+ * 
+ * <pre>
+ * String durableClientId = ...; // Some part of the event's key or value would contain this id
+ * Cache cache = CacheFactory.getAnyInstance();
+ * CacheServer cacheServer = (CacheServer) cache.getCacheServers().iterator().next();
+ * ClientSession clientSession = cacheServer.getClientSession(durableClientId);
+ * clientSession.registerInterest(event.getRegion().getFullPath(), event.getKey(), InterestResultPolicy.KEYS_VALUES, true);
+ * </pre>
+ * 
+ * @author Barry Oglesby
+ * @since 6.0
+ * @see com.gemstone.gemfire.cache.server.CacheServer#getClientSession(String)
+ *      getClientSession
+ * @see com.gemstone.gemfire.cache.server.CacheServer#getClientSession(com.gemstone.gemfire.distributed.DistributedMember)
+ *      getClientSession
+ *
+ */
+public interface ClientSession {
+
+  /**
+   * Registers interest in a particular region and key
+   * 
+   * @param regionName
+   *          The name of the region in which to register interest
+   * @param keyOfInterest
+   *          The key on which to register interest
+   * @param policy
+   *          The {@link com.gemstone.gemfire.cache.InterestResultPolicy}. Note:
+   *          For the special token 'ALL_KEYS' and lists of keys, values are not
+   *          pushed to the client.
+   * @param isDurable
+   *          Whether the interest is durable
+   * @throws IllegalStateException
+   *           if this is not the primary server for the given client
+   */
+  public void registerInterest(String regionName, Object keyOfInterest,
+      InterestResultPolicy policy, boolean isDurable);
+
+  /**
+   * Registers interest in a particular region and key
+   *
+   * @param regionName
+   *          The name of the region in which to register interest
+   * @param keyOfInterest
+   *          The key to on which to register interest
+   * @param policy
+   *          The {@link com.gemstone.gemfire.cache.InterestResultPolicy}. Note:
+   *          For the special token 'ALL_KEYS' and lists of keys, values are not
+   *          pushed to the client.
+   * @param isDurable
+   *          Whether the interest is durable
+   * @param receiveValues
+   *          Whether to receive create or update events as invalidates similar
+   *          to notify-by-subscription false. The default is true.
+   * @throws IllegalStateException
+   *          if this is not the primary server for the given client
+   * @since 6.5
+   */
+  public void registerInterest(String regionName, Object keyOfInterest,
+      InterestResultPolicy policy, boolean isDurable, boolean receiveValues);
+  
+  /**
+   * Registers interest in a particular region and regular expression
+   *
+   * @param regionName
+   *          The name of the region in which to register interest
+   * @param regex
+   *          The regular expression on which to register interest
+   * @param isDurable
+   *          Whether the interest is durable
+   * @throws IllegalStateException
+   *          if this is not the primary server for the given client
+   */
+  public void registerInterestRegex(String regionName, String regex,
+      boolean isDurable);
+  
+  /**
+   * Registers interest in a particular region and regular expression
+   * 
+   * @param regionName
+   *          The name of the region in which to register interest
+   * @param regex
+   *          The regular expression to on which to register interest
+   * @param isDurable
+   *          Whether the interest is durable
+   * @param receiveValues
+   *          Whether to receive create or update events as invalidates similar
+   *          to notify-by-subscription false. The default is true.
+   * @throws IllegalStateException
+   *           if this is not the primary server for the given client
+   * @since 6.5
+   */
+  public void registerInterestRegex(String regionName, String regex,
+      boolean isDurable, boolean receiveValues);
+
+  /**
+   * Unregisters interest in a particular region and key
+   * 
+   * @param regionName
+   *          The name of the region in which to unregister interest
+   * @param keyOfInterest
+   *          The key on which to unregister interest
+   * @param isDurable
+   *          Whether the interest is durable
+   * @throws IllegalStateException
+   *           if this is not the primary server for the given client
+   */
+  public void unregisterInterest(String regionName, Object keyOfInterest,
+      boolean isDurable);
+  
+  /**
+   * Unregisters interest in a particular region and key
+   * 
+   * @param regionName
+   *          The name of the region in which to unregister interest
+   * @param keyOfInterest
+   *          The key on which to unregister interest
+   * @param isDurable
+   *          Whether the interest is durable
+   * @param receiveValues
+   *          Whether to receive create or update events as invalidates similar
+   *          to notify-by-subscription false. The default is true.
+   * @throws IllegalStateException
+   *           if this is not the primary server for the given client
+   * @since 6.5
+   */
+  public void unregisterInterest(String regionName, Object keyOfInterest,
+      boolean isDurable, boolean receiveValues);
+
+  /**
+   * Unregisters interest in a particular region and regular expression
+   * 
+   * @param regionName
+   *          The name of the region in which to unregister interest
+   * @param regex
+   *          The regular expression on which to unregister interest
+   * @param isDurable
+   *          Whether the interest is durable
+   * @throws IllegalStateException
+   *           if this is not the primary server for the given client
+   */
+  public void unregisterInterestRegex(String regionName, String regex,
+      boolean isDurable);
+
+  /**
+   * Unregisters interest in a particular region and regular expression
+   * 
+   * @param regionName
+   *          The name of the region in which to unregister interest
+   * @param regex
+   *          The regular expression on which to unregister interest
+   * @param isDurable
+   *          Whether the interest is durable
+   * @param receiveValues
+   *          Whether to receive create or update events as invalidates similar
+   *          to notify-by-subscription false. The default is true.
+   * @throws IllegalStateException
+   *           if this is not the primary server for the given client
+   * @since 6.5
+   */
+  public void unregisterInterestRegex(String regionName, String regex,
+      boolean isDurable, boolean receiveValues);
+
+  /**
+   * Returns whether this server is the primary for this client
+   *
+   * @return whether this server is the primary for this client
+   */
+  public boolean isPrimary();
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19459053/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CommitConflictException.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CommitConflictException.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CommitConflictException.java
new file mode 100644
index 0000000..a957ebc
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CommitConflictException.java
@@ -0,0 +1,48 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *========================================================================
+ */
+
+package com.gemstone.gemfire.cache;
+
+/** Thrown when a commit fails due to a write conflict.
+ *
+ * @author Darrel Schneider
+ *
+ * @see CacheTransactionManager#commit
+ * @since 4.0
+ */
+public class CommitConflictException extends TransactionException {
+  private static final long serialVersionUID = -1491184174802596675L;
+
+  /**
+   * Constructs an instance of <code>CommitConflictException</code> with the specified detail message.
+   * @param msg the detail message
+   */
+  public CommitConflictException(String msg) {
+    super(msg);
+  }
+  
+  /**
+   * Constructs an instance of <code>CommitConflictException</code> with the specified detail message
+   * and cause.
+   * @param msg the detail message
+   * @param cause the causal Throwable
+   */
+  public CommitConflictException(String msg, Throwable cause) {
+    super(msg, cause);
+  }
+  
+  /**
+   * Constructs an instance of <code>CommitConflictException</code> with the specified cause.
+   * @param cause the causal Throwable
+   * @since 6.5
+   */
+  public CommitConflictException(Throwable cause) {
+    super(cause);
+  }
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19459053/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CommitDistributionException.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CommitDistributionException.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CommitDistributionException.java
new file mode 100755
index 0000000..7763f54
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CommitDistributionException.java
@@ -0,0 +1,72 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *========================================================================
+ */
+package com.gemstone.gemfire.cache;
+
+import java.util.*;
+
+/**
+ * Indicates that an attempt to notify required participants of a transaction 
+ * involving one or more regions that are configured with {@link 
+ * MembershipAttributes} may have failed. The commit itself was completed but
+ * one or more regions affected by the transaction have one or more required
+ * roles that were not successfully notified. Failure may be caused by 
+ * departure of one or more required roles while sending the operation to
+ * them. This exception will contain one {@link RegionDistributionException}
+ * for every region that had a reliability failure. Details of the failed
+ * {@link MembershipAttributes#getRequiredRoles required roles} are provided
+ *  in each RegionDistributionException.
+ *
+ * @author Kirk Lund
+ * @since 5.0
+ */
+public class CommitDistributionException extends TransactionException {
+  private static final long serialVersionUID = -3517820638706581823L;
+  /** 
+   * The RegionDistributionExceptions for every region that had a reliability
+   * failure during distribution of the operation.
+   */
+  private Set regionDistributionExceptions = Collections.EMPTY_SET;
+  
+  /** 
+   * Constructs a <code>CommitDistributionException</code> with a message.
+   *
+   * @param s the String message
+   */
+  public CommitDistributionException(String s) {
+    super(s);
+  }
+  
+  /** 
+   * Constructs a <code>CommitDistributionException</code> with a message and
+   * a cause.
+   *
+   * @param s the String message
+   * @param regionDistributionExceptions set of RegionDistributionExceptions
+   * for each region that had a reliability failure
+   */
+  public CommitDistributionException(String s, Set regionDistributionExceptions) {
+    super(s);
+    this.regionDistributionExceptions = regionDistributionExceptions;
+    if (this.regionDistributionExceptions == null) {
+      this.regionDistributionExceptions = Collections.EMPTY_SET;
+    }
+  }
+  
+  /** 
+   * Returns set of RegionDistributionExceptions for each region that had a 
+   * reliability failure during distribution of the operation.
+   *
+   * @return set of RegionDistributionExceptions for each region that had a 
+   * reliability failure during distribution of the operation
+   */
+  public Set getRegionDistributionExceptions() {
+    return this.regionDistributionExceptions;
+  }
+  
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19459053/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CommitIncompleteException.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CommitIncompleteException.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CommitIncompleteException.java
new file mode 100644
index 0000000..f0aa031
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CommitIncompleteException.java
@@ -0,0 +1,15 @@
+package com.gemstone.gemfire.cache;
+
+/**
+ * Thrown when a commit fails to complete due to errors
+ * @author Mitch Thomas
+ * @since 5.7
+ */
+public class CommitIncompleteException extends TransactionException {
+private static final long serialVersionUID = 1017741483744420800L;
+
+  public CommitIncompleteException(String message) {
+    super(message);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19459053/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CustomExpiry.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CustomExpiry.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CustomExpiry.java
new file mode 100644
index 0000000..fbcf398
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/CustomExpiry.java
@@ -0,0 +1,33 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+package com.gemstone.gemfire.cache;
+
+/**
+ * This is the contract that a <code>custom-expiry</code> element must honor.
+ * It determines the expiration characteristics for a specific entry in a region.
+ * <p>Note that if you wish to refer to an implementation of this interface in XML,
+ * the implementation must also implement the Declarable interface.
+ * 
+ * @author jpenney
+ *
+ */
+public interface CustomExpiry<K,V> extends CacheCallback {
+
+  /**
+   * Calculate the expiration for a given entry.
+   * Returning null indicates that the
+   * default for the region should be used.
+   * <p>
+   * The entry parameter should not be used after this method invocation completes.
+   * @param entry the entry to calculate the expiration for
+   * @return the expiration to be used, null if the region's defaults should be
+   * used.
+   */
+  public ExpirationAttributes getExpiry(Region.Entry<K,V> entry);
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19459053/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DataPolicy.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DataPolicy.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DataPolicy.java
new file mode 100644
index 0000000..fdf9a12
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DataPolicy.java
@@ -0,0 +1,246 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+
+package com.gemstone.gemfire.cache;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+
+import java.io.*;
+
+/**
+ * Enumerated type for region data policy.
+ * The data policy specifies how this local cache will handle the data for a region.
+ * <ol>
+ * <li><code>EMPTY</code> causes data to never be stored in local memory. The region will always appear empty. It can be used to for zero footprint producers that only want to distribute their data to others and for zero footprint consumers that only want to see events.
+ * <li><code>NORMAL</code> causes data that this region is interested in to be stored in local memory. It allows the contents in this cache to differ from other caches.
+ * <li><code>PARTITION</code> causes data that this region holds to be spread across processes.  The amount of data held in this cache is configured in {@link PartitionAttributes} with a {@link PartitionAttributesFactory}.
+ * <li><code>PERSISTENT_PARTITION</code> in addition to <code>PARTITION</code> also causes data to be stored to disk. The region initialization uses the data stored on disk.
+ * <li><code>REPLICATE</code> causes data that this region is interested in to be stored in local memory. A distributed region will be initialized with the data from other caches. On distributed region operations that would cause the contents to differ with other caches are not allowed. This policy is allowed on local scope region but it behaves the same as <code>NORMAL</code>.
+ * <li><code>PERSISTENT_REPLICATE</code> in addition to <code>REPLICATE</code> also causes data to be stored to disk. The region initialization uses the data stored on disk. Note that the persistence applies to both local scope and distributed scope.
+ * </ol>
+ *
+ * @author Darrel Schneider
+ *
+ *
+ * @see AttributesFactory#setDataPolicy
+ * @see RegionAttributes#getDataPolicy
+ *
+ * @since 5.0
+ */
+public class DataPolicy implements java.io.Serializable {
+  private static final long serialVersionUID = 2095573273889467233L;
+
+  private static final DataPolicy[] VALUES = new DataPolicy[10];
+
+  /**
+   * Data is never stored in local memory.
+   * The region will always be empty locally.
+   * It can be used to for zero footprint producers that only want to distribute
+   * their data to others
+   * and for zero footprint consumers that only want to see events.
+   */
+  public static final DataPolicy EMPTY = new DataPolicy(0, "EMPTY");
+
+  /**
+   * Allows the contents in this cache to differ from other caches.<p>
+   * Data that this region is interested in is stored in local memory.
+   */
+  public static final DataPolicy NORMAL = new DataPolicy(1, "NORMAL");
+
+  /**
+   * The region will be initialized with the data from other caches and accepts
+   * any new entries created in other caches.<p>
+   * Operations that would cause the contents to differ with other caches
+   * are not allowed.<p>
+   * Data that this region is interested in is stored in local memory.
+   */
+  public static final DataPolicy REPLICATE = new DataPolicy(2, "REPLICATE");
+
+  /**
+   * In addition to <code>REPLICATE</code> also causes data to be stored to
+   * disk. The region initialization may use the data stored on disk.
+   */
+  public static final DataPolicy PERSISTENT_REPLICATE = new DataPolicy(3, "PERSISTENT_REPLICATE");
+  
+  
+  /**
+   * Data in this region may be spread across a number of processes.  This is
+   * further configured with {@link PartitionAttributes partitioning attributes}
+   */
+  public static final DataPolicy PARTITION = new DataPolicy(4, "PARTITION");
+
+  /**
+  * In addition to <code>NORMAL</code>, contents inside of this cache are
+  * (partially) initialized with data from other caches, if available.
+  */
+  public static final DataPolicy PRELOADED = new DataPolicy(5, "PRELOADED");
+
+  /**
+   * In addition to <code>PARTITION</code> also causes data to be stored to
+   * disk. The region initialization may use the data stored on disk.
+   * @since 6.5
+   */
+  public static final DataPolicy PERSISTENT_PARTITION = new DataPolicy(6, "PERSISTENT_PARTITION");
+  
+   /**
+   * The data policy used by default; it is {@link #NORMAL}.
+   */
+  public static final DataPolicy DEFAULT = NORMAL;
+
+    
+  /** The name of this mirror type. */
+  private final transient String name;
+    
+  /** used as ordinal to represent this DataPolicy */
+  public final byte ordinal;
+
+  private Object readResolve() throws ObjectStreamException {
+    return VALUES[ordinal];  // Canonicalize
+  }
+    
+    
+  /** Creates a new instance of DataPolicy. */
+  private DataPolicy(int ordinal, String name) {
+    if (ordinal >= VALUES.length) {
+      throw new IllegalArgumentException(LocalizedStrings.DataPolicy_ONLY_0_DATAPOLICIES_MAY_BE_DEFINED.toLocalizedString(Integer.valueOf(VALUES.length+1)));
+    }
+    if (VALUES[ordinal] != null) {
+      throw new IllegalArgumentException(LocalizedStrings.DataPolicy_ORDINAL_0_IS_ALREADY_DEFINED_BY_1.toLocalizedString(new Object[] {Integer.valueOf(ordinal), VALUES[ordinal]}));
+    }
+    this.name = name;
+    this.ordinal = (byte)(ordinal & 0xff);
+    VALUES[this.ordinal] = this;
+  }
+    
+  /** Return the DataPolicy represented by specified ordinal */
+  public static DataPolicy fromOrdinal(byte ordinal) {
+    return VALUES[ordinal];
+  }
+    
+    
+  /** Return true if regions with this policy store data locally.<p>
+   * Although DataPolicy {@link #PARTITION} will return true to this query,
+   * it is possible to turn off local storage with
+   * {@link PartitionAttributesFactory#setLocalMaxMemory(int)} by setting
+   * localMaxMemory to zero. 
+   * @return true if regions with this policy store data locally.
+   * @see #NORMAL
+   * @see #PRELOADED
+   * @see #REPLICATE
+   * @see #PERSISTENT_REPLICATE
+   * @see #PARTITION
+   * @see #PERSISTENT_PARTITION
+   */
+  public boolean withStorage() {
+    return this != EMPTY;
+  }
+
+  /** Return whether this policy does replication.
+   * @return true if this policy does replication.
+   * @see #REPLICATE
+   * @see #PERSISTENT_REPLICATE
+   */
+  public boolean withReplication() {
+    return this == REPLICATE || this == PERSISTENT_REPLICATE;
+  }
+  
+  /** Return whether this policy does persistence.
+   * @return true if this policy does persistence.
+   * @see #PERSISTENT_PARTITION
+   * @see #PERSISTENT_REPLICATE
+   * @since 6.5
+   */
+  public boolean withPersistence() {
+    return this == PERSISTENT_PARTITION || this == PERSISTENT_REPLICATE;
+  }
+
+  /** Return whether this policy does partitioning.
+   * @return true if this policy does partitioning
+   * @see #PARTITION
+   * @see #PERSISTENT_PARTITION
+   * @since 6.5
+   */
+  public boolean withPartitioning() {
+    return this == PARTITION || this == PERSISTENT_PARTITION;
+  }
+
+  /** Return whether this policy does preloaded.
+   * @return true if this policy does preloaded.
+   * @see #PRELOADED
+   * @since 6.5
+   */
+  public boolean withPreloaded() {
+    return this == PRELOADED;
+  }
+
+  /**
+   * Return true if this policy is {@link #EMPTY}.
+   * @return true if this policy is {@link #EMPTY}.
+   * @deprecated from version 6.5 forward please use withStorage()
+   */
+  public boolean isEmpty() {
+    return this == EMPTY;
+  }
+  /**
+   * Return true if this policy is {@link #NORMAL}.
+   * @return true if this policy is {@link #NORMAL}.
+   * @deprecated from version 6.5 forward please use an identity comparison instead of this method
+   */
+  public boolean isNormal() {
+    return this == NORMAL;
+  }
+  /**
+   * Return true if this policy is {@link #PRELOADED}.
+   * @return true if this policy is {@link #PRELOADED}
+   * @deprecated from version 6.5 forward please use withPreloaded()
+   */
+  public boolean isPreloaded() {
+    return this == PRELOADED;
+  }
+  /**
+   * Return true if this policy is the default.
+   * @return true if this policy is the default.
+   * @deprecated from version 6.5 forward please use an identity comparison instead of this method
+   */
+  public boolean isDefault() {
+    return this == DEFAULT;
+  }
+  /**
+   * Return true if this policy is {@link #REPLICATE}.
+   * @return true if this policy is {@link #REPLICATE}.
+   * @deprecated from version 6.5 forward please use withReplication()
+   */
+  public boolean isReplicate() {
+    return this == REPLICATE;
+  }
+  /**
+   * Return true if this policy is {@link #PERSISTENT_REPLICATE}.
+   * @return true if this policy is {@link #PERSISTENT_REPLICATE}.
+   * @deprecated from version 6.5 forward please use withPersistence() and withReplication()
+   */
+  public boolean isPersistentReplicate() {
+    return this == PERSISTENT_REPLICATE;
+  }
+  
+  /**
+   * Return true if this policy is {@link #PARTITION}.
+   * @return true if this policy is {@link #PARTITION}
+   * @deprecated from version 6.5 forward please use withPartitioning()
+   */
+  public boolean isPartition() {
+    return this == PARTITION;
+  }
+  
+  /** Returns a string representation for this data policy.
+     * @return the name of this data policy.
+     */
+  @Override
+  public String toString() {
+    return this.name;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19459053/gemfire-core/src/main/java/com/gemstone/gemfire/cache/Declarable.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/Declarable.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/Declarable.java
new file mode 100644
index 0000000..4f2633d
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/Declarable.java
@@ -0,0 +1,68 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *========================================================================
+ */
+package com.gemstone.gemfire.cache;
+
+import java.util.Properties;
+
+/** 
+ * An object that can be described in a declarative caching XML file.
+ *
+ * <p>
+ *
+ * Any user-defined object in the declarative caching xml file
+ * should implement this interface in order to be constructed.
+ *
+ * <p>
+ *
+ * For example, the user can declare a <code>CacheLoader</code> in a declarative
+ * XML file as follows:
+ *
+ * <pre>
+ *        &lt;cache-loader&gt;
+ *          &lt;class-name&gt;com.company.app.DBLoader&lt;/class-name&gt;
+ *          &lt;parameter name="URL"&gt;
+ *            &lt;string&gt;jdbc://12.34.56.78/mydb&lt;/string&gt;
+ *          &lt;/parameter&gt;
+ *        &lt;/cache-loader&gt;
+ * </pre>
+ *
+ * <p>
+ *
+ * In this case, <code>com.company.app.DBLoader</code> must 
+ * implement both the {@link CacheLoader} and <code>Declarable</code>
+ * interfaces. The cache service will construct a
+ * <code>com.company.app.DBLoader</code> object by invoking the loader's
+ * zero-argument constructor and then calling the {@link #init} method
+ * to pass in the parameters.
+ *
+ * <P>
+ *
+ * See <a href="package-summary.html#declarative">package introduction</a>.
+ *
+ * @author Darrel Schneider
+ *
+ * 
+ * @since 2.0
+ */
+public interface Declarable {
+
+  /**
+   * Initializes a user-defined object using the given properties.
+   * Note that any uncaught exception thrown by this method will cause
+   * the <code>Cache</code> initialization to fail.
+   *
+   * @param props 
+   *        Contains the parameters declared in the declarative xml
+   *        file.
+   *
+   * @throws IllegalArgumentException
+   *         If one of the configuration options in <code>props</code>
+   *         is illegal or malformed.
+   */
+  public void init(Properties props);
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19459053/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DiskAccessException.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DiskAccessException.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DiskAccessException.java
new file mode 100644
index 0000000..c3ce541
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DiskAccessException.java
@@ -0,0 +1,132 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *========================================================================
+ */
+package com.gemstone.gemfire.cache;
+
+import java.io.IOException;
+
+/**
+ * Indicates that an <code>IOException</code> during a disk region operation.
+ *
+ * @author Darrel Schneider
+ *
+ *
+ * @since 3.2
+ */
+public class DiskAccessException extends CacheRuntimeException {
+  private static final long serialVersionUID = 5799100281147167888L;
+
+  private transient boolean isRemote;
+  
+  /**
+   * Constructs a new <code>DiskAccessException</code>.
+   */
+  public DiskAccessException() {
+    super();
+  }
+  
+  /**
+   * Constructs a new <code>DiskAccessException</code> with a message string.
+   *
+   * @param msg a message string
+   * @param r The Region for which the disk operation failed
+   */
+  public DiskAccessException(String msg, Region r) {
+    this(msg, null, r == null ? null : r.getFullPath());
+  }
+  
+  /**
+   * Constructs a new <code>DiskAccessException</code> with a message string.
+   *
+   * @param msg a message string
+   * @param regionName The name of the Region for which the disk operation failed
+   * @since 6.5
+   */
+  public DiskAccessException(String msg, String regionName) {
+    this(msg, null, regionName);
+  }
+
+  /**
+   * Constructs a new <code>DiskAccessException</code> with a message string.
+   *
+   * @param msg a message string
+   * @param ds The disk store for which the disk operation failed
+   * @since 6.5
+   */
+  public DiskAccessException(String msg, DiskStore ds) {
+    this(msg, null, ds);
+  }
+  
+  /**
+   * Constructs a new <code>DiskAccessException</code> with a message string
+   * and a cause.
+   *
+   * @param msg the message string
+   * @param cause a causal Throwable
+   * @param regionName The name of the Region for which the disk operation failed
+   * @since 6.5
+   */
+  public DiskAccessException(String msg, Throwable cause, String regionName) {
+    super((regionName!=null ? "For Region: " + regionName + ": " : "") + msg, cause);
+  }
+
+  /**
+   * Constructs a new <code>DiskAccessException</code> with a message string
+   * and a cause.
+   *
+   * @param msg the message string
+   * @param cause a causal Throwable
+   * @param ds The disk store for which the disk operation failed
+   * @since 6.5
+   */
+  public DiskAccessException(String msg, Throwable cause, DiskStore ds) {
+    super((ds!=null ? "For DiskStore: " + ds.getName() + ": " : "") + msg, cause);
+  }
+  
+  /**
+   * Constructs a new <code>DiskAccessException</code> with a cause.
+   *
+   * @param cause a causal Throwable
+   */
+  public DiskAccessException(Throwable cause) {
+    super(cause);
+  }
+  
+  /**
+   * Constructs a new <code>DiskAccessException</code> with a message string
+   * and a cause.
+   *
+   * @param msg the message string
+   * @param cause a causal Throwable
+   * @since gemfire 8.0
+   */
+  public DiskAccessException(String msg, Throwable cause) {
+    super(msg, cause);
+  }
+  
+  /**
+   * Returns true if this exception originated from a remote node.
+   */
+  public final boolean isRemote() {
+    return this.isRemote;
+  }
+
+  // Overrides to set "isRemote" flag after deserialization
+
+  private synchronized void writeObject(final java.io.ObjectOutputStream out)
+      throws IOException {
+    getStackTrace(); // Ensure that stackTrace field is initialized.
+    out.defaultWriteObject();
+  }
+
+  private void readObject(final java.io.ObjectInputStream in)
+      throws IOException, ClassNotFoundException {
+    in.defaultReadObject();
+    this.isRemote = true;
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19459053/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DiskStore.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DiskStore.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DiskStore.java
new file mode 100644
index 0000000..fe2056c
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DiskStore.java
@@ -0,0 +1,207 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.gemstone.gemfire.cache;
+
+import java.io.File;
+import java.util.UUID;
+
+/**
+ * Provides disk storage for one or more regions. The regions in the same disk store will
+ * share the same disk persistence attributes. A region without a disk store name
+ * belongs to the default disk store.
+ * <p>Instances of this interface are created using
+ * {@link DiskStoreFactory#create}. So to create a <code>DiskStore</code> named <code>myDiskStore</code> do this:
+ * <PRE>
+ *   new DiskStoreFactory().create("myDiskStore");
+ * </PRE>
+ * <p>Existing DiskStore instances can be found using {@link Cache#findDiskStore(String)}
+ *
+ * @author Gester
+ * @since 6.5
+ *
+ */
+public interface DiskStore {
+
+  /**
+   * Get the name of the DiskStore
+   *
+   * @return the name of the DiskStore
+   * @see DiskStoreFactory#create
+   */
+  public String getName();
+
+  /**
+   * Returns true if the disk files are to be automatically compacted.
+   *
+   * @return Returns true if the disk files are to be automatically compacted;
+   *         false if automatic compaction is turned off
+   */
+  public boolean getAutoCompact();
+
+  /**
+   * Returns the threshold at which an oplog will become compactable. Until it reaches
+   * this threshold the oplog will not be compacted.
+   * The threshold is a percentage in the range 0..100.
+   * @return the threshold, as a percentage, at which an oplog is considered compactable.
+   */
+  public int getCompactionThreshold();
+
+  /**
+   * Returns true if manual compaction of disk files is allowed on this region.
+   * Manual compaction is done be calling {@link #forceCompaction}.
+   * <p>Note that calls to {@link #forceCompaction} will also be allowed if {@link #getAutoCompact automatic compaction} is enabled.
+   *
+   * @return Returns true if manual compaction of disk files is allowed on this region.
+   */
+  public boolean getAllowForceCompaction();
+
+  /**
+   * Get the maximum size in megabytes a single oplog (operation log) file should be
+   *
+   * @return the maximum size in megabyte the operations log file can be
+   */
+  public long getMaxOplogSize();
+
+  /**
+   * Returns the number of milliseconds that can elapse before
+   * unwritten data is written to disk.
+   *
+   * @return Returns the time interval in milliseconds that can elapse between two writes to disk
+   */
+  public long getTimeInterval();
+
+  /**
+   * Returns the size of the write buffer that this disk store will use when
+   * writing data to disk. Larger values may increase performance but will use
+   * more memory.
+   * The disk store will allocate one direct memory buffer of this size.
+   *
+   * @return Returns the size of the write buffer.
+   */
+  public int getWriteBufferSize();
+
+  /**
+   * Returns the directories to which the region's data are written.  If
+   * multiple directories are used, GemFire will attempt to distribute the
+   * data evenly amongst them.
+   *
+   */
+  public File[] getDiskDirs();
+
+  /**
+   * Returns the sizes of the disk directories in megabytes
+   */
+  public int[] getDiskDirSizes();
+
+  /**
+   * Returns the universally unique identifier for the Disk Store across the GemFire distributed system.
+   * </p>
+   * @return a UUID uniquely identifying this Disk Store in the GemFire distributed system.
+   * @see java.util.UUID
+   */
+  public UUID getDiskStoreUUID();
+
+  /**
+   * Returns the maximum number of operations that can be asynchronously
+   * queued to be written to disk. When this limit is reached, it will cause
+   * operations to block until they can be put in the queue.
+   * If this <code>DiskStore</code> configures synchronous writing, then
+   * <code>queueSize</code> is ignored.
+   *
+   * @return the maxinum number of entries that can be queued concurrently
+   * for asynchronous writting to disk.
+   *
+   */
+  public int getQueueSize();
+
+  /**
+   * Causes any data that is currently in the asynchronous queue to be written
+   * to disk. Does not return until the flush is complete.
+   *
+   * @throws DiskAccessException
+   *         If problems are encounter while writing to disk
+   */
+  public void flush();
+
+  /**
+   * Asks the disk store to start writing to a new oplog.
+   * The old oplog will be asynchronously compressed if compaction is set to true.
+   * The new oplog will be created in the next available directory with free space.
+   * If there is no directory with free space available and compaction is set to false,
+   * then a <code>DiskAccessException</code> saying that the disk is full will be
+   * thrown.
+   * If compaction is true then the application will wait for the other oplogs
+   * to be compacted and more space to be created.
+   *
+   * @throws DiskAccessException
+   */
+  public void forceRoll();
+
+   /**
+    * Allows a disk compaction to be forced on this disk store. The compaction
+    * is done even if automatic compaction is not configured.
+    * If the current active oplog has had data written to it and it is
+    * compactable then an implicit call to {@link #forceRoll} will be made
+    * so that the active oplog can be compacted.
+    * <P>This method will block until the compaction completes.
+    * @return <code>true</code> if one or more oplogs were compacted;
+    * <code>false</code> indicates that no oplogs were ready
+    * to be compacted or that a compaction was already in progress.
+    * @see #getAllowForceCompaction
+    */
+  public boolean forceCompaction();
+  
+  /**
+   * Destroys this disk store. Removes the disk store from the cache,
+   * and removes all files related to the disk store from disk.
+   * 
+   * If there are any currently open regions in the disk store
+   * this method will throw an exception. If there are any closed regions that 
+   * are persisted in this disk store, the data for those regions 
+   * will be destroyed. 
+   *
+   * @throws IllegalStateException if the disk store is currently
+   * in use by any regions, gateway senders, or a PDX type registry.
+   * 
+   * @since 8.0
+   */
+  public void destroy();
+  
+
+  /**
+   * Returns the warning threshold for disk usage as a percentage of the total 
+   * disk volume.
+   * 
+   * @return the warning percent
+   * @since 8.0
+   */
+  public float getDiskUsageWarningPercentage();
+
+  /**
+   * Returns the critical threshold for disk usage as a percentage of the total 
+   * disk volume.
+   * 
+   * @return the critical percent
+   * @since 8.0
+   */
+  public float getDiskUsageCriticalPercentage();
+  
+  /**
+   * Sets the value of the disk usage warning percentage.
+   * 
+   * @param warningPercent the warning percent
+   */
+  public void setDiskUsageWarningPercentage(float warningPercent);
+  
+  /**
+   * Sets the value of the disk usage critical percentage.
+   * 
+   * @param criticalPercent the critical percent
+   */
+  public void setDiskUsageCriticalPercentage(float criticalPercent);
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19459053/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DiskStoreFactory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DiskStoreFactory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DiskStoreFactory.java
new file mode 100755
index 0000000..ab67c75
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DiskStoreFactory.java
@@ -0,0 +1,234 @@
+/*=========================================================================
+ * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.gemstone.gemfire.cache;
+
+
+import java.io.File;
+
+/**
+ * Factory for creating instances of {@link DiskStore}.
+ * To get an instance of this factory call {@link Cache#createDiskStoreFactory}.
+ * If all you want to do is find an existing disk store see {@link Cache#findDiskStore}.
+ * <P>
+ * To use this factory configure it with the <code>set</code> methods and then
+ * call {@link #create} to produce a disk store instance.
+ * 
+ * @author Gester
+ * @since 6.5
+ */
+public interface DiskStoreFactory
+{
+  /**
+   * The name of the default disk store is "DEFAULT".
+   * This name can be used to redefine the default disk store.
+   * Regions that have not had their disk-store-name set will
+   * use this disk store.
+   */
+  public static final String DEFAULT_DISK_STORE_NAME = "DEFAULT";
+  /**
+   * The default setting for auto compaction. 
+   * <p>Current value: <code>true</code>.
+   */
+  public static final boolean DEFAULT_AUTO_COMPACT = true;
+  
+  /**
+   * The default compaction threshold.
+   * <p>Current value: <code>50</code>.
+   */
+  public static final int DEFAULT_COMPACTION_THRESHOLD = 50;
+
+  /**
+   * The default value of the allow force compaction attribute.
+   * <p>Current value: <code>false</code>.
+   */
+  public static final boolean DEFAULT_ALLOW_FORCE_COMPACTION = false;
+
+  /**
+   * The default maximum oplog file size in megabytes.
+   * <p>Current value: <code>1024</code> which is one gigabyte.
+   */
+  public static final long DEFAULT_MAX_OPLOG_SIZE = Long.getLong("gemfire.DEFAULT_MAX_OPLOG_SIZE", 1024L).longValue(); // 1024 == 1 GB; // sys prop used by dunit and junit
+
+  /**
+   * The default time interval in milliseconds.
+   * <p>Current value: <code>1000</code>.
+   */
+  public static final long DEFAULT_TIME_INTERVAL = 1000; // 1 sec;
+  
+  /**
+   * The default write buffer size.
+   * <p>Current value: <code>32768</code>.
+   */
+  public static final int DEFAULT_WRITE_BUFFER_SIZE = 32 * 1024;
+
+  /**
+   * The default maximum number of operations that can be asynchronously queued.
+   * <p>Current value: <code>0</code>.
+   */
+  public static final int DEFAULT_QUEUE_SIZE = 0;
+  
+  /**
+   * The default disk directories.
+   * <p>Current value: <code>current directory</code>.
+   */
+  public static final File[] DEFAULT_DISK_DIRS = new File[] { new File(".") };
+  
+  /**
+   * The default disk directory size in megabytes.
+   * <p>Current value: <code>2,147,483,647</code> which is two petabytes.
+   */
+  public static final int DEFAULT_DISK_DIR_SIZE = Integer.MAX_VALUE; // unlimited for bug 41863
+  
+  /**
+   * The default disk directory sizes.
+   * <p>Current value: {@link #DEFAULT_DISK_DIR_SIZE} which is two petabytes each.
+   */
+  public static final int[] DEFAULT_DISK_DIR_SIZES = new int[] {DEFAULT_DISK_DIR_SIZE};
+
+  /**
+   * The default disk usage warning percentage.
+   * <p>Current value: <code>90</code>.
+   */
+  public static final float DEFAULT_DISK_USAGE_WARNING_PERCENTAGE = 90;
+  
+  /**
+   * The default disk usage critical percentage.
+   * <p>Current value: <code>99</code>.
+   */
+  public static final float DEFAULT_DISK_USAGE_CRITICAL_PERCENTAGE = 99;
+  
+  /** 
+   * Set to <code>true</code> to cause the disk files to be automatically compacted.
+   * Set to <code>false</code> if no compaction is needed or manual compaction will be used.
+   * @param isAutoCompact if true then use auto compaction
+   * @return a reference to <code>this</code>
+   */
+  public DiskStoreFactory setAutoCompact(boolean isAutoCompact);
+
+  /**
+   * Sets the threshold at which an oplog will become compactable. Until it reaches
+   * this threshold the oplog will not be compacted.
+   * The threshold is a percentage in the range 0..100.
+   * When the amount of garbage in an oplog exceeds this percentage then when a compaction
+   * is done this garbage will be cleaned up freeing up disk space. Garbage is created by
+   * entry destroys, entry updates, and region destroys.
+   * @param compactionThreshold the threshold percentage at which an oplog is compactable
+   * @return a reference to <code>this</code>
+   */
+  public DiskStoreFactory setCompactionThreshold(int compactionThreshold);
+
+  /** 
+   * Set to <code>true</code> to allow {@link DiskStore#forceCompaction} to be called
+   * on regions using this disk store.
+   *
+   * @param allowForceCompaction if true then allow force compaction.
+   * @return a reference to <code>this</code>
+   */
+  public DiskStoreFactory setAllowForceCompaction(boolean allowForceCompaction);
+
+  /** 
+   * Sets the maximum size in megabytes a single oplog (operation log) is allowed to be.
+   * When an oplog is created this amount of file space will be immediately reserved.
+   * 
+   * @param maxOplogSize maximum size in megabytes for one single oplog file.
+   * @return a reference to <code>this</code>
+   */
+  public DiskStoreFactory setMaxOplogSize(long maxOplogSize);
+
+  /**
+   * Sets the number of milliseconds that can elapse before
+   * data written asynchronously is flushed to disk.
+   * <p>For how to configure a region to be asynchronous see: {@link AttributesFactory#setDiskSynchronous}.
+   * 
+   * @param timeInterval number of milliseconds that can elapse before
+   * async data is flushed to disk.
+   * @return a reference to <code>this</code>
+   */
+  public DiskStoreFactory setTimeInterval(long timeInterval);
+
+  /**
+   * Sets the write buffer size in bytes.
+   * 
+   * @param writeBufferSize write buffer size in bytes.
+   * @return a reference to <code>this</code>
+   */
+  public DiskStoreFactory setWriteBufferSize(int writeBufferSize);
+
+  /**
+   * Sets the maximum number of operations that can be asynchronously queued.
+   * Once this many pending async operations have been queued async ops will
+   * begin blocking until some of the queued ops have been flushed to disk.
+   * <p>
+   * For how to configure a region to be asynchronous see:
+   * {@link AttributesFactory#setDiskSynchronous}.
+   * 
+   * @param queueSize
+   *          number of operations that can be asynchronously queued. If 0, the
+   *          queue will be unlimited.
+   * @return a reference to <code>this</code>
+   */
+  public DiskStoreFactory setQueueSize(int queueSize);
+
+  /**
+   * Sets the directories to which this disk store's data is written. If multiple
+   * directories are used, GemFire will attempt to distribute the data evenly
+   * amongst them.
+   * The size of each directory will be set to the default of {@link #DEFAULT_DISK_DIR_SIZE}.
+   * 
+   * @param diskDirs directories to put the oplog files.
+   * @return a reference to <code>this</code>
+   * 
+   * @throws GemfireIOException if a directory cannot be created
+   */
+  public DiskStoreFactory setDiskDirs(File[] diskDirs);
+
+  /**
+   * Sets the directories to which this disk store's data is written
+   * and also set the sizes in megabytes of each directory.
+   * 
+   * @param diskDirs directories to put the oplog files.
+   * @param diskDirSizes sizes of disk directories in megabytes
+   * @return a reference to <code>this</code>
+   * 
+   * @throws IllegalArgumentException if length of the size array
+   * does not match to the length of the dir array
+   * @throws GemfireIOException if a directory cannot be created
+   */
+  public DiskStoreFactory setDiskDirsAndSizes(File[] diskDirs,int[] diskDirSizes);
+
+  /**
+   * Sets the warning threshold for disk usage as a percentage of the total disk
+   * volume.
+   * 
+   * @param warningPercent warning percent of disk usage
+   * @return a reference to <code>this</code>
+   * @since 8.0
+   */
+  public DiskStoreFactory setDiskUsageWarningPercentage(float warningPercent);
+
+  /**
+   * Sets the critical threshold for disk usage as a percentage of the total disk
+   * volume.
+   * 
+   * @param criticalPercent critical percent of disk usage
+   * @return a reference to <code>this</code>
+   * @since 8.0
+   */
+  public DiskStoreFactory setDiskUsageCriticalPercentage(float criticalPercent);
+
+  /**
+   * Create a new disk store or find an existing one. In either case the returned disk store's
+   * configuration will be the same as this factory's configuration.
+   * 
+   * @param name the name of the DiskStore
+   * @return the newly created DiskStore.
+   * @throws IllegalStateException if a disk store with the given name already exists
+   * and its configuration is not consistent with this factory.
+   */
+  public DiskStore create(String name);
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/19459053/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DiskWriteAttributes.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DiskWriteAttributes.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DiskWriteAttributes.java
new file mode 100644
index 0000000..a7067b9
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DiskWriteAttributes.java
@@ -0,0 +1,99 @@
+/*=========================================================================
+ * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.gemstone.gemfire.cache;
+
+/**
+ * Immutable parameter object for describing how {@linkplain
+ * Region.Entry region entries} should be written to disk.
+ *
+ * @see DiskWriteAttributesFactory
+ * @see AttributesFactory#setDiskWriteAttributes
+ * @see RegionAttributes#getDiskWriteAttributes
+ * @see Region#writeToDisk
+ *
+ * @author David Whitlock
+ * @author Mitul Bid
+ *
+ * @since 3.2
+ * @deprecated as of 6.5 use {@link DiskStore} instead
+ */
+@Deprecated
+public interface DiskWriteAttributes
+  extends java.io.Serializable {
+
+
+
+  //////////////////////  Instance Methods  //////////////////////
+
+ 
+
+  /**
+   * Returns true if this <code>DiskWriteAttributes</code> object
+   * configures synchronous writes.
+   * 
+   * @return Returns true if writes to disk are synchronous and false otherwise
+   * @deprecated as of 6.5 use {@link RegionAttributes#isDiskSynchronous} instead.
+   */
+  @Deprecated
+  public boolean isSynchronous();
+  
+  
+  /** 
+   * Returns true if the oplogs is to be rolled to a more condensed format (on disk)
+   * 
+   * @return Returns true if the oplogs is to be rolled or false otherwise
+   */
+  public boolean isRollOplogs();
+
+  /** 
+   * Get the maximum size in megabytes a single oplog (operation log) file should be 
+   * 
+   * @return the maximum size the operations log file can be
+   * @deprecated as of 6.5 use {@link DiskStore#getMaxOplogSize()} 
+   * instead.
+   */
+  @Deprecated
+  public int getMaxOplogSize();
+
+  /**
+   * Returns the number of milliseconds that can elapse before
+   * unwritten data is written to disk.  If this
+   * <code>DiskWriteAttributes</code> configures synchronous writing,
+   * then <code>timeInterval</code> has no meaning.
+   * 
+   * @return Returns the time interval in milliseconds that can elapse between two writes to disk
+   * @deprecated as of 6.5 use {@link DiskStore#getTimeInterval()} 
+   * instead.
+   */
+  @Deprecated
+  public long getTimeInterval();
+
+  /**
+   * Returns the number of unwritten bytes of data that can be
+   * enqueued before being written to disk.  If this
+   * <code>DiskWriteAttributes</code> configures synchronous writing,
+   * then <code>bytesThreshold</code> has no meaning.
+   * 
+   * @return Returns the number of bytes that can be buffered before being written to disk
+   * @deprecated as of 6.5 use {@link DiskStore#getQueueSize()} 
+   * instead.
+   */
+  @Deprecated
+  public long getBytesThreshold();
+
+  /**
+   * Two <code>DiskWriteAttributes</code> are equal if the both
+   * specify the synchronous writes, or they both specify asynchronous
+   * writes with the same time interval, bytes threshold, maxOplogSize and
+   * compaction values
+   * 
+   * @return true if o is equal else false
+   */
+  public boolean equals(Object o);
+
+}