Skip to content

Commit

Permalink
Updated javadocs for some of the internal cache classes - Fixes #3011.
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Goncharuk <alexey.goncharuk@gmail.com>
  • Loading branch information
dpavlov authored and agoncharuk committed Nov 10, 2017
1 parent 20ec6c9 commit 291b166
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ public void onKernalStop() {

/**
* @param cctx Cache context.
* @param destroy Destroy flag.
* @param destroy Destroy data flag. Setting to <code>true</code> will remove all cache data.
*/
void stopCache(GridCacheContext cctx, boolean destroy) {
if (top != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class DynamicCacheChangeRequest implements Serializable {
/** Cache active on start or not*/
private boolean disabledAfterStart;

/** Destroy. */
/** Cache data destroy flag. Setting to <code>true</code> will cause removing all cache data.*/
private boolean destroy;

/** Whether cache was created through SQL. */
Expand Down Expand Up @@ -144,7 +144,7 @@ static DynamicCacheChangeRequest addTemplateRequest(GridKernalContext ctx, Cache
* @param ctx Context.
* @param cacheName Cache name.
* @param sql {@code true} if the cache must be stopped only if it was created by SQL command {@code CREATE TABLE}.
* @param destroy Destroy flag.
* @param destroy Cache data destroy flag. Setting to <code>true</code> will cause removing all cache data.
* @return Cache stop request.
*/
public static DynamicCacheChangeRequest stopRequest(
Expand Down Expand Up @@ -226,14 +226,15 @@ public boolean stop() {
}

/**
* @return Destroy flag.
* @return Cache data destroy flag. Setting to <code>true</code> will remove all cache data.
*/
public boolean destroy(){
return destroy;
}

/**
* @param destroy Destroy.
* Sets cache data destroy flag. Setting to <code>true</code> will cause removing all cache data.
* @param destroy Destroy flag.
*/
public void destroy(boolean destroy) {
this.destroy = destroy;
Expand Down Expand Up @@ -359,6 +360,8 @@ public boolean sql() {
}

/**
* Sets if cache is created using create table.
*
* @param sql New SQL flag.
*/
public void sql(boolean sql) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,7 @@ private void startCache(GridCacheAdapter<?, ?> cache, QuerySchema schema) throws
/**
* @param cache Cache to stop.
* @param cancel Cancel flag.
* @param destroy Destroy data flag. Setting to <code>true</code> will remove all cache data.
*/
@SuppressWarnings({"TypeMayBeWeakened", "unchecked"})
private void stopCache(GridCacheAdapter<?, ?> cache, boolean cancel, boolean destroy) {
Expand Down Expand Up @@ -1963,7 +1964,7 @@ private void stopGateway(DynamicCacheChangeRequest req) {

/**
* @param cacheName Cache name.
* @param destroy Cache destroy flag.
* @param destroy Cache data destroy flag. Setting to <code>true</code> will remove all cache data.
* @return Stopped cache context.
*/
private GridCacheContext<?, ?> prepareCacheStop(String cacheName, boolean destroy) {
Expand Down Expand Up @@ -2697,6 +2698,7 @@ else if (internalCaches.contains(ccfg.getName()))
* @param sql If the cache needs to be destroyed only if it was created as the result of SQL {@code CREATE TABLE}
* command.
* @param checkThreadTx If {@code true} checks that current thread does not have active transactions.
* @param restart Restart flag.
* @return Future that will be completed when cache is destroyed.
*/
public IgniteInternalFuture<Boolean> dynamicDestroyCache(String cacheName, boolean sql, boolean checkThreadTx,
Expand All @@ -2718,6 +2720,7 @@ public IgniteInternalFuture<Boolean> dynamicDestroyCache(String cacheName, boole
/**
* @param cacheNames Collection of cache names to destroy.
* @param checkThreadTx If {@code true} checks that current thread does not have active transactions.
* @param restart Restart flag.
* @return Future that will be completed when cache is destroyed.
*/
public IgniteInternalFuture<?> dynamicDestroyCaches(Collection<String> cacheNames, boolean checkThreadTx,
Expand All @@ -2728,6 +2731,8 @@ public IgniteInternalFuture<?> dynamicDestroyCaches(Collection<String> cacheName
/**
* @param cacheNames Collection of cache names to destroy.
* @param checkThreadTx If {@code true} checks that current thread does not have active transactions.
* @param restart Restart flag.
* @param destroy Cache data destroy flag. Setting to <code>true</code> will cause removing all cache data
* @return Future that will be completed when cache is destroyed.
*/
public IgniteInternalFuture<?> dynamicDestroyCaches(Collection<String> cacheNames, boolean checkThreadTx,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public interface IgniteCacheOffheapManager {

/**
* @param cacheId Cache ID.
* @param destroy Destroy data flag.
* @param destroy Destroy data flag. Setting to <code>true</code> will remove all cache data.
*/
public void stopCache(int cacheId, boolean destroy);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,18 @@ public interface SnapshotOperation extends Serializable {
/**
* Cache group ids included to this snapshot.
*
* @return Cache names.
* @return Cache group identifiers.
*/
public Set<Integer> cacheGroupIds();

/**
* Cache names included to this snapshot.
* @return Cache names included to this snapshot.
*/
public Set<String> cacheNames();

/**
* Any custom extra parameter.
* @return Any custom extra parameter.
* In case Map object is provided, contains named snapshot operation attributes.
*/
public Object extraParameter();
}

0 comments on commit 291b166

Please sign in to comment.