class CacheableWorkspaceDataManager extends WorkspacePersistentDataManager implements Suspendable, Startable,
   WorkspaceStorageCacheListener {

   @Override
   public int getChildNodesCount(final NodeData parent) throws RepositoryException
   {

      if (cache.isEnabled())
      {
         int childCount = cache.getChildNodesCount(parent);
         if (childCount >= 0)
         {
            return childCount;
         }
      }
      final DataRequest request = new DataRequest(parent.getIdentifier(), DataRequest.GET_NODES);

      try
      {
         request.start();
         if (cache.isEnabled())
         {
            // Try first to get the value from the cache since a
            // request could have been launched just before
            int childCount = cache.getChildNodesCount(parent);
            if (childCount >= 0)
            {
               return childCount;
            }
         }

         return executeAction(new PrivilegedExceptionAction<Integer>()
         {
            public Integer run() throws RepositoryException
            {
               int childCount = CacheableWorkspaceDataManager.super.getChildNodesCount(parent);
               if (cache.isEnabled())
               {
                  cache.addChildNodesCount(parent, childCount);
               }
               return childCount;
            }
         });
      }
      finally
      {
         request.done();
      }
   }

   public  CacheableWorkspaceDataManager(WorkspaceEntry wsConfig, WorkspaceDataContainer dataContainer,
      WorkspaceStorageCache cache, SystemDataContainerHolder systemDataContainerHolder,
      TransactionableResourceManager txResourceManager, TransactionService transactionService, RPCService rpcService);
   public  CacheableWorkspaceDataManager(WorkspaceEntry wsConfig, WorkspaceDataContainer dataContainer,
      WorkspaceStorageCache cache, SystemDataContainerHolder systemDataContainerHolder,
      TransactionableResourceManager txResourceManager, TransactionService transactionService);
   public  CacheableWorkspaceDataManager(WorkspaceEntry wsConfig, WorkspaceDataContainer dataContainer,
      WorkspaceStorageCache cache, SystemDataContainerHolder systemDataContainerHolder,
      TransactionableResourceManager txResourceManager, RPCService rpcService);
   public  CacheableWorkspaceDataManager(WorkspaceEntry wsConfig, WorkspaceDataContainer dataContainer,
      WorkspaceStorageCache cache, SystemDataContainerHolder systemDataContainerHolder,
      TransactionableResourceManager txResourceManager);
   public  CacheableWorkspaceDataManager(WorkspaceEntry wsConfig, WorkspaceDataContainer dataContainer,
      WorkspaceStorageCache cache, SystemDataContainerHolder systemDataContainerHolder);

}