View Javadoc

1   package com.atlassian.vcache.internal.core;
2   
3   import com.atlassian.vcache.internal.RequestContext;
4   
5   /**
6    * Provides tracking of transactional resources that need to be synchronised.
7    */
8   public interface TransactionControlManager
9   {
10      /**
11       * Register a {@link com.atlassian.vcache.TransactionalExternalCache} for synchronisation.
12       *
13       * @param requestContext the context for tracking
14       * @param cacheName the name of cache to be registered
15       * @param control the control used to synchronise the cache.
16       */
17      void registerTransactionalExternalCache(RequestContext requestContext, String cacheName, TransactionControl control);
18  
19      /**
20       * Synchronises all the resources previously registered using {@link #registerTransactionalExternalCache(RequestContext, String, TransactionControl)}.
21       * @param requestContext the context used for tracking
22       */
23      void syncAll(RequestContext requestContext);
24  }