More style cleanup.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5249 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2008-07-22 13:39:42 +00:00
parent c743432676
commit 67ce73b61d
9 changed files with 29 additions and 32 deletions
@@ -457,7 +457,9 @@ public class BlockingCommunicator extends Communicator
// of the frame from the network, in which case we simply call it again because we can't do
// anything until it has a whole frame; it will throw an exception if it hits EOF or if
// something goes awry)
while (!_fin.readFrame(_channel));
while (!_fin.readFrame(_channel)) {
// noop!
}
try {
DownstreamMessage msg = (DownstreamMessage)_oin.readObject();
@@ -677,11 +679,11 @@ public class BlockingCommunicator extends Communicator
*/
protected class Writer extends LoopingThread
{
public Writer()
public Writer ()
{
super("BlockingCommunicator_Writer");
}
@Override
protected void iterate ()
{
@@ -977,7 +979,7 @@ public class BlockingCommunicator extends Communicator
protected ClientDObjectMgr _omgr;
protected ClassLoader _loader;
/** The number of times per port to try to establish a datagram "connection." */
/** The number of times per port to try to establish a datagram "connection". */
protected static final int DATAGRAM_ATTEMPTS_PER_PORT = 10;
/** The number of milliseconds to wait for a response datagram. */
@@ -56,14 +56,14 @@ public class ClientCommunicator extends BlockingCommunicator
protected void setPrefPort (String key, int port) {
PresentsPrefs.config.setValue(key, port);
}
/**
* Gets our preferred connection port via our preferences mechanism.
*/
protected int getPrefPort (String key, int defaultPort) {
return PresentsPrefs.config.getValue(key, defaultPort);
}
@Override // from BlockingCommunicator
protected void openChannel (InetAddress host)
throws IOException
@@ -62,7 +62,14 @@ public class ClientDObjectMgr
_client = client;
// register a debug hook for dumping all objects in the distributed object table
DebugChords.registerHook(DUMP_OTABLE_MODMASK, DUMP_OTABLE_KEYCODE, DUMP_OTABLE_HOOK);
DebugChords.registerHook(DUMP_OTABLE_MODMASK, DUMP_OTABLE_KEYCODE, new DebugChords.Hook() {
public void invoke () {
log.info("Dumping " + _ocache.size() + " objects:");
for (DObject obj : _ocache.values()) {
log.info(obj.getClass().getName() + " " + obj);
}
}
});
// register a flush interval
new Interval(client.getRunQueue()) {
@@ -448,6 +455,7 @@ public class ClientDObjectMgr
}
}
/** Represents a pending subscription request. */
protected static final class PendingRequest<T extends DObject>
{
public int oid;
@@ -499,21 +507,11 @@ public class ClientDObjectMgr
protected HashIntMap<PendingRequest<?>> _penders = new HashIntMap<PendingRequest<?>>();
/** A mapping from distributed object class to flush delay. */
protected HashMap<Class<?>,Long> _delays = new HashMap<Class<?>,Long>();
protected HashMap<Class<?>, Long> _delays = new HashMap<Class<?>, Long>();
/** A set of objects waiting to be flushed. */
protected HashIntMap<FlushRecord> _flushes = new HashIntMap<FlushRecord>();
/** A debug hook that allows the dumping of all objects in the object table out to the log. */
protected DebugChords.Hook DUMP_OTABLE_HOOK = new DebugChords.Hook() {
public void invoke () {
log.info("Dumping " + _ocache.size() + " objects:");
for (DObject obj : _ocache.values()) {
log.info(obj.getClass().getName() + " " + obj);
}
}
};
/** The modifiers for our dump table debug hook (Alt+Shift). */
protected static int DUMP_OTABLE_MODMASK = KeyEvent.ALT_DOWN_MASK|KeyEvent.SHIFT_DOWN_MASK;
@@ -29,7 +29,7 @@ package com.threerings.presents.client;
* <pre>
* public interface LocationService extends InvocationService
* {
*
*
* // Used to communicate responses to moveTo() requests.
* public interface MoveListener extends InvocationListener
* {
@@ -21,9 +21,6 @@
package com.threerings.presents.client;
import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService;
/**
* Provides a means by which to obtain access to a time base object which can be used to convert
* delta times into absolute times.