Skip to content

Commit

Permalink
transfermanager: formatting patch
Browse files Browse the repository at this point in the history
Adjust formatting to be more consistent with other dCache code.

Target: master
Requires-notes: no
Requires-book: bo
  • Loading branch information
paulmillar committed Dec 12, 2013
1 parent 85994d4 commit 322adcb
Show file tree
Hide file tree
Showing 2 changed files with 192 additions and 162 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
import org.dcache.srm.scheduler.JobIdGeneratorFactory;

/**
* Base class for services that transfer files on behalf of SRM. Used
* to implement server-side srmCopy.
* Base class for services that transfer files on behalf of SRM. Used to
* implement server-side srmCopy.
*/
public abstract class TransferManager extends AbstractCell
{
Expand Down Expand Up @@ -83,7 +83,9 @@ public abstract class TransferManager extends AbstractCell
public final Set<PnfsId> justRequestedIDs = new HashSet<>();
private String _poolProxy;

/** Creates a new instance of Class */
/**
* Creates a new instance of Class
*/
public TransferManager(String cellName, String args)
throws InterruptedException, ExecutionException
{
Expand Down Expand Up @@ -345,6 +347,7 @@ public void getInfo(PrintWriter pw)
}
return "OK";
}

public final static String hh_set_tlog = "<direcory for ftp logs or \"null\" for none>";

public String ac_set_tlog_$_1(Args args)
Expand All @@ -356,6 +359,7 @@ public void getInfo(PrintWriter pw)
}
return "remote ftp transactions will be logged to " + _tLogRoot;
}

public final static String hh_set_max_transfers = "<#max transfers>";

public String ac_set_max_transfers_$_1(Args args)
Expand All @@ -367,6 +371,7 @@ public void getInfo(PrintWriter pw)
setMaxTransfers(max);
return "set maximum number of active transfers to " + max;
}

public final static String hh_set_pool_timeout = "<#seconds>";

public String ac_set_pool_timeout_$_1(Args args)
Expand All @@ -378,6 +383,7 @@ public void getInfo(PrintWriter pw)
_poolTimeout = timeout;
return "set pool timeout to " + timeout + " seconds";
}

public final static String hh_set_pool_manager_timeout = "<#seconds>";

public String ac_set_pool_manager_timeout_$_1(Args args)
Expand All @@ -389,6 +395,7 @@ public void getInfo(PrintWriter pw)
_poolManagerTimeout = timeout;
return "set pool manager timeout to " + timeout + " seconds";
}

public final static String hh_set_pnfs_manager_timeout = "<#seconds>";

public String ac_set_pnfs_manager_timeout_$_1(Args args)
Expand All @@ -400,6 +407,7 @@ public void getInfo(PrintWriter pw)
_pnfsManagerTimeout = timeout;
return "set pnfs manager timeout to " + timeout + " seconds";
}

public final static String hh_ls = "[-l] [<#transferId>]";

public String ac_ls_$_0_1(Args args)
Expand All @@ -424,6 +432,7 @@ public void getInfo(PrintWriter pw)
}
return sb.toString();
}

public final static String hh_kill = " id";

public String ac_kill_$_1(Args args)
Expand All @@ -434,12 +443,12 @@ public void getInfo(PrintWriter pw)
return "ID not found : " + id;
}
handler.cancel(null);
return "this will kill the running mover or the mover queued on the pool!!!\n" +
"killing the Transfer:\n" + handler.toString(true);
return "this will kill the running mover or the mover queued on the pool!!!\n"
+ "killing the Transfer:\n" + handler.toString(true);
}

public final static String hh_killall = " [-p pool] pattern [pool] \n" +
" for example killall .* ketchup will kill all transfers with movers on the ketchup pool";
public final static String hh_killall = " [-p pool] pattern [pool] \n"
+ " for example killall .* ketchup will kill all transfers with movers on the ketchup pool";

public String ac_killall_$_1_2(Args args)
{
Expand Down Expand Up @@ -480,6 +489,7 @@ public void getInfo(PrintWriter pw)
return e.toString();
}
}

public final static String hh_set_io_queue = "<io-queue name >";

public String ac_set_io_queue_$_1(Args args)
Expand Down Expand Up @@ -577,8 +587,7 @@ public synchronized long getNextMessageID()
return nextMessageID;
}

protected abstract IpProtocolInfo getProtocolInfo(TransferManagerMessage transferRequest)
;
protected abstract IpProtocolInfo getProtocolInfo(TransferManagerMessage transferRequest);

protected TransferManagerHandler getHandler(long handlerId)
{
Expand Down Expand Up @@ -737,7 +746,8 @@ public synchronized PersistenceManager getPersistenceManager()
return _pm;
}

public static void rollbackIfActive(Transaction tx) {
public static void rollbackIfActive(Transaction tx)
{
if (tx != null && tx.isActive()) {
tx.rollback();
}
Expand All @@ -763,7 +773,8 @@ public int getMaxNumberOfDeleteRetries()
return _maxNumberOfDeleteRetries;
}

public void persist(Object o) {
public void persist(Object o)
{
// pm is not final, so better make a final local copy
// before we synchronize on it and use it
final PersistenceManager persistanceManager = _pm;
Expand Down
Loading

0 comments on commit 322adcb

Please sign in to comment.