Skip to content

Commit

Permalink
Remove dead code from AbstractCell
Browse files Browse the repository at this point in the history
Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: https://rb.dcache.org/r/8779/
  • Loading branch information
gbehrmann committed Nov 20, 2015
1 parent 60ddcf9 commit 078e22d
Showing 1 changed file with 0 additions and 57 deletions.
57 changes: 0 additions & 57 deletions modules/dcache/src/main/java/org/dcache/cells/AbstractCell.java
@@ -1,11 +1,6 @@
package org.dcache.cells;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.PrintWriter;
import java.io.Serializable;
import java.io.StringWriter;
import java.util.concurrent.Executor;

import diskCacheV111.util.CacheException;
Expand All @@ -31,27 +26,6 @@
*
* See org.dcache.util.CellMessageDispatcher for details.
*
* <h2>Initialisation</h2>
*
* AbstractCell provides the <code>init</code> method for performing
* cell initialisation. This method is executed in a thread allocated
* from the cells thread, and thus the thread group and log4j context
* are automatically inherited for any threads created during
* initialisation. Any log messages generated from within the
* <code>init</code> method are correctly attributed to the
* cell. Subclasses should override <code>init</code> rather than
* performing initialisation steps in the constructor.
*
* The <code>init</code> method is called by <code>doInit</code>,
* which makes sure <code>init</code> is executed in the correct
* thread. <code>doInit</code> also enables cells message delivery by
* calling <code>CellAdapter.start</code>. Should <code>init</code>
* throw an exception, then <code>doInit</code> immediately kills the
* cell and logs an error message.
*
* Subclasses must call doInit (preferably from their constructor) for
* any of this to work.
*
* <h2>Option parsing</h2>
*
* AbstractCell supports automatic option parsing based on annotations
Expand Down Expand Up @@ -112,8 +86,6 @@
*/
public class AbstractCell extends CellAdapter implements CellMessageReceiver
{
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractCell.class);

private static final String MSG_UOID_MISMATCH =
"A reply [%s] was generated by a message listener, but the " +
"message UOID indicates that another message listener has " +
Expand Down Expand Up @@ -156,11 +128,6 @@ public class AbstractCell extends CellAdapter implements CellMessageReceiver
protected final CellMessageDispatcher _forwardDispatcher =
new CellMessageDispatcher("messageToForward");

/**
* Name of context variable to execute during setup, or null.
*/
protected String _definedSetup;

protected MessageProcessingMonitor _monitor;

/**
Expand Down Expand Up @@ -228,30 +195,6 @@ protected void startUp() throws Exception
addCommandListener(_monitor);
}

/**
* Returns the friendly cell name used for logging. It defaults to
* the cell name.
*/
protected String getFriendlyName()
{
return getCellName();
}

public void debug(String str)
{
LOGGER.debug(str);
}

public void debug(Throwable t)
{
LOGGER.debug(t.getMessage());
StringWriter sw = new StringWriter();
t.printStackTrace(new PrintWriter(sw));
for (String s : sw.toString().split("\n")) {
LOGGER.debug(s);
}
}

/**
* Adds a listener for dCache messages.
*
Expand Down

0 comments on commit 078e22d

Please sign in to comment.