id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
41,300
threerings/narya
core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java
ChatDirector.processReceivedMessage
protected void processReceivedMessage (ChatMessage msg, String localtype) { String autoResponse = null; Name speaker = null; Name speakerDisplay = null; byte mode = (byte)-1; // figure out if the message was triggered by another user if (msg instanceof UserMessage) {...
java
protected void processReceivedMessage (ChatMessage msg, String localtype) { String autoResponse = null; Name speaker = null; Name speakerDisplay = null; byte mode = (byte)-1; // figure out if the message was triggered by another user if (msg instanceof UserMessage) {...
[ "protected", "void", "processReceivedMessage", "(", "ChatMessage", "msg", ",", "String", "localtype", ")", "{", "String", "autoResponse", "=", "null", ";", "Name", "speaker", "=", "null", ";", "Name", "speakerDisplay", "=", "null", ";", "byte", "mode", "=", ...
Processes and dispatches the specified chat message.
[ "Processes", "and", "dispatches", "the", "specified", "chat", "message", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java#L736-L787
41,301
threerings/narya
core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java
ChatDirector.addToHistory
protected void addToHistory (String cmd) { // remove any previous instance of this command _history.remove(cmd); // append it to the end _history.add(cmd); // prune the history once it extends beyond max size if (_history.size() > MAX_COMMAND_HISTORY) { ...
java
protected void addToHistory (String cmd) { // remove any previous instance of this command _history.remove(cmd); // append it to the end _history.add(cmd); // prune the history once it extends beyond max size if (_history.size() > MAX_COMMAND_HISTORY) { ...
[ "protected", "void", "addToHistory", "(", "String", "cmd", ")", "{", "// remove any previous instance of this command", "_history", ".", "remove", "(", "cmd", ")", ";", "// append it to the end", "_history", ".", "add", "(", "cmd", ")", ";", "// prune the history once...
Adds the specified command to the history.
[ "Adds", "the", "specified", "command", "to", "the", "history", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java#L853-L865
41,302
threerings/narya
core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java
ChatDirector.mogrifyChat
protected String mogrifyChat ( String text, byte mode, boolean transformsAllowed, boolean capFirst) { int tlen = text.length(); if (tlen == 0) { return text; // check to make sure there aren't too many caps } else if (tlen > 7 && suppressTooManyCaps()) { ...
java
protected String mogrifyChat ( String text, byte mode, boolean transformsAllowed, boolean capFirst) { int tlen = text.length(); if (tlen == 0) { return text; // check to make sure there aren't too many caps } else if (tlen > 7 && suppressTooManyCaps()) { ...
[ "protected", "String", "mogrifyChat", "(", "String", "text", ",", "byte", "mode", ",", "boolean", "transformsAllowed", ",", "boolean", "capFirst", ")", "{", "int", "tlen", "=", "text", ".", "length", "(", ")", ";", "if", "(", "tlen", "==", "0", ")", "{...
Mogrifies common literary crutches into more appealing chat or commands. @param mode the chat mode, or -1 if unknown. @param transformsAllowed if true, the chat may transformed into a different mode. (lol -> /emote laughs) @param capFirst if true, the first letter of the text is capitalized. This is not desired if the...
[ "Mogrifies", "common", "literary", "crutches", "into", "more", "appealing", "chat", "or", "commands", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java#L876-L902
41,303
threerings/narya
core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java
ChatDirector.addChatter
protected void addChatter (Name name) { // check to see if the chatter validator approves.. if ((_chatterValidator != null) && (!_chatterValidator.isChatterValid(name))) { return; } boolean wasthere = _chatters.remove(name); _chatters.addFirst(name); if (...
java
protected void addChatter (Name name) { // check to see if the chatter validator approves.. if ((_chatterValidator != null) && (!_chatterValidator.isChatterValid(name))) { return; } boolean wasthere = _chatters.remove(name); _chatters.addFirst(name); if (...
[ "protected", "void", "addChatter", "(", "Name", "name", ")", "{", "// check to see if the chatter validator approves..", "if", "(", "(", "_chatterValidator", "!=", "null", ")", "&&", "(", "!", "_chatterValidator", ".", "isChatterValid", "(", "name", ")", ")", ")",...
Adds a chatter to our list of recent chatters.
[ "Adds", "a", "chatter", "to", "our", "list", "of", "recent", "chatters", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java#L1025-L1040
41,304
threerings/narya
core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java
ChatDirector.setClientInfo
protected void setClientInfo (ChatMessage msg, String localType) { if (msg.localtype == null) { msg.setClientInfo(xlate(msg.bundle, msg.message), localType); } }
java
protected void setClientInfo (ChatMessage msg, String localType) { if (msg.localtype == null) { msg.setClientInfo(xlate(msg.bundle, msg.message), localType); } }
[ "protected", "void", "setClientInfo", "(", "ChatMessage", "msg", ",", "String", "localType", ")", "{", "if", "(", "msg", ".", "localtype", "==", "null", ")", "{", "msg", ".", "setClientInfo", "(", "xlate", "(", "msg", ".", "bundle", ",", "msg", ".", "m...
Set the "client info" on the specified message, if not already set.
[ "Set", "the", "client", "info", "on", "the", "specified", "message", "if", "not", "already", "set", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java#L1058-L1063
41,305
threerings/narya
core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java
ChatDirector.xlate
protected String xlate (String bundle, String message) { if (bundle != null && _ctx.getMessageManager() != null) { MessageBundle msgb = _ctx.getMessageManager().getBundle(bundle); if (msgb == null) { log.warning("No message bundle available to translate message", "bun...
java
protected String xlate (String bundle, String message) { if (bundle != null && _ctx.getMessageManager() != null) { MessageBundle msgb = _ctx.getMessageManager().getBundle(bundle); if (msgb == null) { log.warning("No message bundle available to translate message", "bun...
[ "protected", "String", "xlate", "(", "String", "bundle", ",", "String", "message", ")", "{", "if", "(", "bundle", "!=", "null", "&&", "_ctx", ".", "getMessageManager", "(", ")", "!=", "null", ")", "{", "MessageBundle", "msgb", "=", "_ctx", ".", "getMessa...
Translates the specified message using the specified bundle.
[ "Translates", "the", "specified", "message", "using", "the", "specified", "bundle", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java#L1068-L1080
41,306
threerings/narya
core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java
ChatDirector.displaySystem
protected void displaySystem (String bundle, String message, byte attLevel, String localtype) { // nothing should be untranslated, so pass the default bundle if need be. if (bundle == null) { bundle = _bundle; } SystemMessage msg = new SystemMessage(message, bundle, attLe...
java
protected void displaySystem (String bundle, String message, byte attLevel, String localtype) { // nothing should be untranslated, so pass the default bundle if need be. if (bundle == null) { bundle = _bundle; } SystemMessage msg = new SystemMessage(message, bundle, attLe...
[ "protected", "void", "displaySystem", "(", "String", "bundle", ",", "String", "message", ",", "byte", "attLevel", ",", "String", "localtype", ")", "{", "// nothing should be untranslated, so pass the default bundle if need be.", "if", "(", "bundle", "==", "null", ")", ...
Display the specified system message as if it had come from the server.
[ "Display", "the", "specified", "system", "message", "as", "if", "it", "had", "come", "from", "the", "server", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java#L1085-L1093
41,307
threerings/narya
core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java
ChatDirector.getLocalType
protected String getLocalType (int oid) { String type = _auxes.get(oid); return (type == null) ? PLACE_CHAT_TYPE : type; }
java
protected String getLocalType (int oid) { String type = _auxes.get(oid); return (type == null) ? PLACE_CHAT_TYPE : type; }
[ "protected", "String", "getLocalType", "(", "int", "oid", ")", "{", "String", "type", "=", "_auxes", ".", "get", "(", "oid", ")", ";", "return", "(", "type", "==", "null", ")", "?", "PLACE_CHAT_TYPE", ":", "type", ";", "}" ]
Looks up and returns the message type associated with the specified oid.
[ "Looks", "up", "and", "returns", "the", "message", "type", "associated", "with", "the", "specified", "oid", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java#L1098-L1102
41,308
dkpro/dkpro-argumentation
dkpro-argumentation-io/src/main/java/org/dkpro/argumentation/io/writer/ArgumentDumpWriter.java
ArgumentDumpWriter.dumpArguments
public static String dumpArguments(JCas jCas, boolean includeProperties, boolean includeRelations) { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); PrintStream out = new PrintStream(outputStream); String documentId = DocumentMetaData.get(jCas).getDocumentId(); ou...
java
public static String dumpArguments(JCas jCas, boolean includeProperties, boolean includeRelations) { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); PrintStream out = new PrintStream(outputStream); String documentId = DocumentMetaData.get(jCas).getDocumentId(); ou...
[ "public", "static", "String", "dumpArguments", "(", "JCas", "jCas", ",", "boolean", "includeProperties", ",", "boolean", "includeRelations", ")", "{", "ByteArrayOutputStream", "outputStream", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "PrintStream", "out", ...
Dump argument components to String. Can be also used outside UIMA pipeline. @param jCas jcas @return string dump
[ "Dump", "argument", "components", "to", "String", ".", "Can", "be", "also", "used", "outside", "UIMA", "pipeline", "." ]
57ce6f5e73d8075b7088aeeebb107c85b3d4bbcb
https://github.com/dkpro/dkpro-argumentation/blob/57ce6f5e73d8075b7088aeeebb107c85b3d4bbcb/dkpro-argumentation-io/src/main/java/org/dkpro/argumentation/io/writer/ArgumentDumpWriter.java#L119-L179
41,309
dkpro/dkpro-argumentation
dkpro-argumentation-io/src/main/java/org/dkpro/argumentation/io/writer/ArgumentDumpWriter.java
ArgumentDumpWriter.argumentUnitToString
public static String argumentUnitToString(ArgumentUnit argumentUnit) { return String.format("%s [%d, %d] \"%s\"", argumentUnit.getType().getShortName(), argumentUnit.getBegin(), argumentUnit.getEnd(), argumentUnit.getCoveredText()); }
java
public static String argumentUnitToString(ArgumentUnit argumentUnit) { return String.format("%s [%d, %d] \"%s\"", argumentUnit.getType().getShortName(), argumentUnit.getBegin(), argumentUnit.getEnd(), argumentUnit.getCoveredText()); }
[ "public", "static", "String", "argumentUnitToString", "(", "ArgumentUnit", "argumentUnit", ")", "{", "return", "String", ".", "format", "(", "\"%s [%d, %d] \\\"%s\\\"\"", ",", "argumentUnit", ".", "getType", "(", ")", ".", "getShortName", "(", ")", ",", "argumentU...
Formats argument unit to string with type, position, and text content @param argumentUnit argument unit @return string
[ "Formats", "argument", "unit", "to", "string", "with", "type", "position", "and", "text", "content" ]
57ce6f5e73d8075b7088aeeebb107c85b3d4bbcb
https://github.com/dkpro/dkpro-argumentation/blob/57ce6f5e73d8075b7088aeeebb107c85b3d4bbcb/dkpro-argumentation-io/src/main/java/org/dkpro/argumentation/io/writer/ArgumentDumpWriter.java#L194-L198
41,310
threerings/narya
core/src/main/java/com/threerings/admin/server/persist/ConfigRepository.java
ConfigRepository.loadConfig
public HashMap<String, String> loadConfig (String node, String object) { HashMap<String, String> data = Maps.newHashMap(); for (ConfigRecord record : from(ConfigRecord.class). where(ConfigRecord.OBJECT.eq(object), ConfigRecord.NODE.eq(node)).select()) { data.put(record.f...
java
public HashMap<String, String> loadConfig (String node, String object) { HashMap<String, String> data = Maps.newHashMap(); for (ConfigRecord record : from(ConfigRecord.class). where(ConfigRecord.OBJECT.eq(object), ConfigRecord.NODE.eq(node)).select()) { data.put(record.f...
[ "public", "HashMap", "<", "String", ",", "String", ">", "loadConfig", "(", "String", "node", ",", "String", "object", ")", "{", "HashMap", "<", "String", ",", "String", ">", "data", "=", "Maps", ".", "newHashMap", "(", ")", ";", "for", "(", "ConfigReco...
Loads up the configuration data for the specified object. @return a map containing field/value pairs for all stored configuration data.
[ "Loads", "up", "the", "configuration", "data", "for", "the", "specified", "object", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/admin/server/persist/ConfigRepository.java#L51-L59
41,311
threerings/narya
core/src/main/java/com/threerings/admin/server/persist/ConfigRepository.java
ConfigRepository.updateConfig
public void updateConfig (String node, String object, String field, String value) { store(new ConfigRecord(node, object, field, value)); }
java
public void updateConfig (String node, String object, String field, String value) { store(new ConfigRecord(node, object, field, value)); }
[ "public", "void", "updateConfig", "(", "String", "node", ",", "String", "object", ",", "String", "field", ",", "String", "value", ")", "{", "store", "(", "new", "ConfigRecord", "(", "node", ",", "object", ",", "field", ",", "value", ")", ")", ";", "}" ...
Updates the specified configuration datum.
[ "Updates", "the", "specified", "configuration", "datum", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/admin/server/persist/ConfigRepository.java#L64-L67
41,312
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsSession.java
PresentsSession.getInetAddress
public InetAddress getInetAddress () { Connection conn = getConnection(); return (conn == null) ? null : conn.getInetAddress(); }
java
public InetAddress getInetAddress () { Connection conn = getConnection(); return (conn == null) ? null : conn.getInetAddress(); }
[ "public", "InetAddress", "getInetAddress", "(", ")", "{", "Connection", "conn", "=", "getConnection", "(", ")", ";", "return", "(", "conn", "==", "null", ")", "?", "null", ":", "conn", ".", "getInetAddress", "(", ")", ";", "}" ]
Returns the address of the connected client or null if this client is not connected.
[ "Returns", "the", "address", "of", "the", "connected", "client", "or", "null", "if", "this", "client", "is", "not", "connected", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsSession.java#L177-L181
41,313
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsSession.java
PresentsSession.setClassLoader
public void setClassLoader (ClassLoader loader) { _loader = loader; PresentsConnection conn = getConnection(); if (conn != null) { conn.setClassLoader(loader); } }
java
public void setClassLoader (ClassLoader loader) { _loader = loader; PresentsConnection conn = getConnection(); if (conn != null) { conn.setClassLoader(loader); } }
[ "public", "void", "setClassLoader", "(", "ClassLoader", "loader", ")", "{", "_loader", "=", "loader", ";", "PresentsConnection", "conn", "=", "getConnection", "(", ")", ";", "if", "(", "conn", "!=", "null", ")", "{", "conn", ".", "setClassLoader", "(", "lo...
Configures this session with a custom class loader that will be used when unserializing classes from the network.
[ "Configures", "this", "session", "with", "a", "custom", "class", "loader", "that", "will", "be", "used", "when", "unserializing", "classes", "from", "the", "network", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsSession.java#L196-L203
41,314
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsSession.java
PresentsSession.endSession
@EventThread public void endSession () { _clmgr.clientSessionWillEnd(this); // queue up a request for our connection to be closed (if we have a connection, that is) Connection conn = getConnection(); if (conn != null) { // go ahead and clear out our connection now to...
java
@EventThread public void endSession () { _clmgr.clientSessionWillEnd(this); // queue up a request for our connection to be closed (if we have a connection, that is) Connection conn = getConnection(); if (conn != null) { // go ahead and clear out our connection now to...
[ "@", "EventThread", "public", "void", "endSession", "(", ")", "{", "_clmgr", ".", "clientSessionWillEnd", "(", "this", ")", ";", "// queue up a request for our connection to be closed (if we have a connection, that is)", "Connection", "conn", "=", "getConnection", "(", ")",...
Forcibly terminates a client's session. This must be called from the dobjmgr thread.
[ "Forcibly", "terminates", "a", "client", "s", "session", ".", "This", "must", "be", "called", "from", "the", "dobjmgr", "thread", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsSession.java#L341-L378
41,315
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsSession.java
PresentsSession.handleMessage
public void handleMessage (Message message) { // if the client has been getting crazy with the cheeze whiz, stick a fork in them; the // first time through we end our session, subsequently _throttle is null and we just drop // any messages that come in until we've fully shutdown if (...
java
public void handleMessage (Message message) { // if the client has been getting crazy with the cheeze whiz, stick a fork in them; the // first time through we end our session, subsequently _throttle is null and we just drop // any messages that come in until we've fully shutdown if (...
[ "public", "void", "handleMessage", "(", "Message", "message", ")", "{", "// if the client has been getting crazy with the cheeze whiz, stick a fork in them; the", "// first time through we end our session, subsequently _throttle is null and we just drop", "// any messages that come in until we'v...
from interface Connection.MessageHandler
[ "from", "interface", "Connection", ".", "MessageHandler" ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsSession.java#L437-L452
41,316
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsSession.java
PresentsSession.dispatchMessage
protected void dispatchMessage (Message message) { _messagesIn++; // count 'em up! // we dispatch to a message dispatcher that is specialized for the particular class of // message that we received MessageDispatcher disp = _disps.get(message.getClass()); if (disp == null) { ...
java
protected void dispatchMessage (Message message) { _messagesIn++; // count 'em up! // we dispatch to a message dispatcher that is specialized for the particular class of // message that we received MessageDispatcher disp = _disps.get(message.getClass()); if (disp == null) { ...
[ "protected", "void", "dispatchMessage", "(", "Message", "message", ")", "{", "_messagesIn", "++", ";", "// count 'em up!", "// we dispatch to a message dispatcher that is specialized for the particular class of", "// message that we received", "MessageDispatcher", "disp", "=", "_di...
Processes a message without throttling.
[ "Processes", "a", "message", "without", "throttling", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsSession.java#L457-L471
41,317
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsSession.java
PresentsSession.startSession
protected void startSession (Name authname, AuthRequest req, PresentsConnection conn, Object authdata) { _authname = authname; _areq = req; _authdata = authdata; setConnection(conn); // resolve our client object before we get fully underway _clmgr.resolveClie...
java
protected void startSession (Name authname, AuthRequest req, PresentsConnection conn, Object authdata) { _authname = authname; _areq = req; _authdata = authdata; setConnection(conn); // resolve our client object before we get fully underway _clmgr.resolveClie...
[ "protected", "void", "startSession", "(", "Name", "authname", ",", "AuthRequest", "req", ",", "PresentsConnection", "conn", ",", "Object", "authdata", ")", "{", "_authname", "=", "authname", ";", "_areq", "=", "req", ";", "_authdata", "=", "authdata", ";", "...
Initializes this client instance with the specified username, connection instance and client object and begins a client session.
[ "Initializes", "this", "client", "instance", "with", "the", "specified", "username", "connection", "instance", "and", "client", "object", "and", "begins", "a", "client", "session", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsSession.java#L494-L507
41,318
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsSession.java
PresentsSession.resumeSession
protected void resumeSession (AuthRequest req, PresentsConnection conn) { // check to see if we've already got a connection object, in which case it's probably stale Connection oldconn = getConnection(); if (oldconn != null && !oldconn.isClosed()) { log.info("Closing stale connec...
java
protected void resumeSession (AuthRequest req, PresentsConnection conn) { // check to see if we've already got a connection object, in which case it's probably stale Connection oldconn = getConnection(); if (oldconn != null && !oldconn.isClosed()) { log.info("Closing stale connec...
[ "protected", "void", "resumeSession", "(", "AuthRequest", "req", ",", "PresentsConnection", "conn", ")", "{", "// check to see if we've already got a connection object, in which case it's probably stale", "Connection", "oldconn", "=", "getConnection", "(", ")", ";", "if", "("...
Called by the client manager when a new connection arrives that authenticates as this already established client. This must only be called from the congmr thread.
[ "Called", "by", "the", "client", "manager", "when", "a", "new", "connection", "arrives", "that", "authenticates", "as", "this", "already", "established", "client", ".", "This", "must", "only", "be", "called", "from", "the", "congmr", "thread", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsSession.java#L513-L547
41,319
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsSession.java
PresentsSession.finishResumeSession
@EventThread protected void finishResumeSession () { // if we have no client object for whatever reason; we're hosed, shut ourselves down if (_clobj == null) { log.info("Missing client object for resuming session " + this + "."); endSession(); return; ...
java
@EventThread protected void finishResumeSession () { // if we have no client object for whatever reason; we're hosed, shut ourselves down if (_clobj == null) { log.info("Missing client object for resuming session " + this + "."); endSession(); return; ...
[ "@", "EventThread", "protected", "void", "finishResumeSession", "(", ")", "{", "// if we have no client object for whatever reason; we're hosed, shut ourselves down", "if", "(", "_clobj", "==", "null", ")", "{", "log", ".", "info", "(", "\"Missing client object for resuming s...
This is called from the dobjmgr thread to complete the session resumption. We call some call backs and send the bootstrap info to the client.
[ "This", "is", "called", "from", "the", "dobjmgr", "thread", "to", "complete", "the", "session", "resumption", ".", "We", "call", "some", "call", "backs", "and", "send", "the", "bootstrap", "info", "to", "the", "client", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsSession.java#L553-L581
41,320
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsSession.java
PresentsSession.safeEndSession
@AnyThread protected void safeEndSession () { if (!_omgr.isRunning()) { log.info("Dropping end session request as we're shutting down " + this + "."); } else { _omgr.postRunnable(new Runnable() { public void run () { endSession(); ...
java
@AnyThread protected void safeEndSession () { if (!_omgr.isRunning()) { log.info("Dropping end session request as we're shutting down " + this + "."); } else { _omgr.postRunnable(new Runnable() { public void run () { endSession(); ...
[ "@", "AnyThread", "protected", "void", "safeEndSession", "(", ")", "{", "if", "(", "!", "_omgr", ".", "isRunning", "(", ")", ")", "{", "log", ".", "info", "(", "\"Dropping end session request as we're shutting down \"", "+", "this", "+", "\".\"", ")", ";", "...
Queues up a runnable on the object manager thread where we can safely end the session.
[ "Queues", "up", "a", "runnable", "on", "the", "object", "manager", "thread", "where", "we", "can", "safely", "end", "the", "session", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsSession.java#L598-L610
41,321
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsSession.java
PresentsSession.unmapSubscrip
protected synchronized void unmapSubscrip (int oid) { ClientProxy rec; synchronized (_subscrips) { rec = _subscrips.remove(oid); } if (rec != null) { rec.unsubscribe(); } else { boolean alreadyDestroyed = _destroyedSubs.remove(oid); ...
java
protected synchronized void unmapSubscrip (int oid) { ClientProxy rec; synchronized (_subscrips) { rec = _subscrips.remove(oid); } if (rec != null) { rec.unsubscribe(); } else { boolean alreadyDestroyed = _destroyedSubs.remove(oid); ...
[ "protected", "synchronized", "void", "unmapSubscrip", "(", "int", "oid", ")", "{", "ClientProxy", "rec", ";", "synchronized", "(", "_subscrips", ")", "{", "rec", "=", "_subscrips", ".", "remove", "(", "oid", ")", ";", "}", "if", "(", "rec", "!=", "null",...
Makes a note that this client is no longer subscribed to this object. The subscription map is used to clean up after the client when it goes away.
[ "Makes", "a", "note", "that", "this", "client", "is", "no", "longer", "subscribed", "to", "this", "object", ".", "The", "subscription", "map", "is", "used", "to", "clean", "up", "after", "the", "client", "when", "it", "goes", "away", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsSession.java#L637-L651
41,322
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsSession.java
PresentsSession.clearSubscrips
protected void clearSubscrips (boolean verbose) { for (ClientProxy rec : _subscrips.values()) { if (verbose) { log.info("Clearing subscription", "client", this, "obj", rec.object.getOid()); } rec.unsubscribe(); } _subscrips.clear(); }
java
protected void clearSubscrips (boolean verbose) { for (ClientProxy rec : _subscrips.values()) { if (verbose) { log.info("Clearing subscription", "client", this, "obj", rec.object.getOid()); } rec.unsubscribe(); } _subscrips.clear(); }
[ "protected", "void", "clearSubscrips", "(", "boolean", "verbose", ")", "{", "for", "(", "ClientProxy", "rec", ":", "_subscrips", ".", "values", "(", ")", ")", "{", "if", "(", "verbose", ")", "{", "log", ".", "info", "(", "\"Clearing subscription\"", ",", ...
Clears out the tracked client subscriptions. Called when the client goes away and shouldn't be called otherwise.
[ "Clears", "out", "the", "tracked", "client", "subscriptions", ".", "Called", "when", "the", "client", "goes", "away", "and", "shouldn", "t", "be", "called", "otherwise", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsSession.java#L657-L666
41,323
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsSession.java
PresentsSession.sendBootstrap
protected void sendBootstrap () { // log.info("Sending bootstrap " + this + "."); // create and populate our bootstrap data BootstrapData data = createBootstrapData(); populateBootstrapData(data); // create a send bootstrap notification postMessage(new BootstrapNoti...
java
protected void sendBootstrap () { // log.info("Sending bootstrap " + this + "."); // create and populate our bootstrap data BootstrapData data = createBootstrapData(); populateBootstrapData(data); // create a send bootstrap notification postMessage(new BootstrapNoti...
[ "protected", "void", "sendBootstrap", "(", ")", "{", "// log.info(\"Sending bootstrap \" + this + \".\");", "// create and populate our bootstrap data", "BootstrapData", "data", "=", "createBootstrapData", "(", ")", ";", "populateBootstrapData", "(", "data", ")", ";", ...
This is called once we have a handle on the client distributed object. It sends a bootstrap notification to the client with all the information it will need to interact with the server.
[ "This", "is", "called", "once", "we", "have", "a", "handle", "on", "the", "client", "distributed", "object", ".", "It", "sends", "a", "bootstrap", "notification", "to", "the", "client", "with", "all", "the", "information", "it", "will", "need", "to", "inte...
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsSession.java#L735-L745
41,324
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsSession.java
PresentsSession.setConnection
protected synchronized void setConnection (PresentsConnection conn) { long now = System.currentTimeMillis(); if (_conn != null) { // if our connection is being cleared out, record the amount of time we were connected // to our total connected time if (conn == null...
java
protected synchronized void setConnection (PresentsConnection conn) { long now = System.currentTimeMillis(); if (_conn != null) { // if our connection is being cleared out, record the amount of time we were connected // to our total connected time if (conn == null...
[ "protected", "synchronized", "void", "setConnection", "(", "PresentsConnection", "conn", ")", "{", "long", "now", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "if", "(", "_conn", "!=", "null", ")", "{", "// if our connection is being cleared out, record t...
Sets our connection reference in a thread safe way. Also establishes the back reference to us as the connection's message handler.
[ "Sets", "our", "connection", "reference", "in", "a", "thread", "safe", "way", ".", "Also", "establishes", "the", "back", "reference", "to", "us", "as", "the", "connection", "s", "message", "handler", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsSession.java#L846-L877
41,325
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsSession.java
PresentsSession.finishCompoundMessage
protected void finishCompoundMessage () { if (--_compoundDepth == 0) { CompoundDownstreamMessage downstream = _compound; _compound = null; if (!downstream.msgs.isEmpty()) { postMessage(downstream, null); } } }
java
protected void finishCompoundMessage () { if (--_compoundDepth == 0) { CompoundDownstreamMessage downstream = _compound; _compound = null; if (!downstream.msgs.isEmpty()) { postMessage(downstream, null); } } }
[ "protected", "void", "finishCompoundMessage", "(", ")", "{", "if", "(", "--", "_compoundDepth", "==", "0", ")", "{", "CompoundDownstreamMessage", "downstream", "=", "_compound", ";", "_compound", "=", "null", ";", "if", "(", "!", "downstream", ".", "msgs", "...
Sends the compound message created in startCompoundMessage.
[ "Sends", "the", "compound", "message", "created", "in", "startCompoundMessage", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsSession.java#L928-L937
41,326
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsSession.java
PresentsSession.postMessage
protected boolean postMessage (DownstreamMessage msg, PresentsConnection expect) { PresentsConnection conn = getConnection(); // make sure that the connection they expect us to be using is the one we're using; there // are circumstances were sufficient delay between request and response giv...
java
protected boolean postMessage (DownstreamMessage msg, PresentsConnection expect) { PresentsConnection conn = getConnection(); // make sure that the connection they expect us to be using is the one we're using; there // are circumstances were sufficient delay between request and response giv...
[ "protected", "boolean", "postMessage", "(", "DownstreamMessage", "msg", ",", "PresentsConnection", "expect", ")", "{", "PresentsConnection", "conn", "=", "getConnection", "(", ")", ";", "// make sure that the connection they expect us to be using is the one we're using; there", ...
Queues a message for delivery to the client.
[ "Queues", "a", "message", "for", "delivery", "to", "the", "client", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsSession.java#L940-L978
41,327
threerings/narya
core/src/main/java/com/threerings/presents/server/PresentsSession.java
PresentsSession.throttleUpdated
protected void throttleUpdated () { int messagesPerSec; synchronized(_pendingThrottles) { if (_pendingThrottles.size() == 0) { log.warning("Received throttleUpdated but have no pending throttles", "client", this); return; ...
java
protected void throttleUpdated () { int messagesPerSec; synchronized(_pendingThrottles) { if (_pendingThrottles.size() == 0) { log.warning("Received throttleUpdated but have no pending throttles", "client", this); return; ...
[ "protected", "void", "throttleUpdated", "(", ")", "{", "int", "messagesPerSec", ";", "synchronized", "(", "_pendingThrottles", ")", "{", "if", "(", "_pendingThrottles", ".", "size", "(", ")", "==", "0", ")", "{", "log", ".", "warning", "(", "\"Received throt...
Notifies this client that its throttle was updated.
[ "Notifies", "this", "client", "that", "its", "throttle", "was", "updated", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/PresentsSession.java#L983-L1002
41,328
threerings/narya
core/src/main/java/com/threerings/presents/util/FutureResult.java
FutureResult.get
public V get (long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { return _sync.innerGet(unit.toNanos(timeout)); }
java
public V get (long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { return _sync.innerGet(unit.toNanos(timeout)); }
[ "public", "V", "get", "(", "long", "timeout", ",", "TimeUnit", "unit", ")", "throws", "InterruptedException", ",", "ExecutionException", ",", "TimeoutException", "{", "return", "_sync", ".", "innerGet", "(", "unit", ".", "toNanos", "(", "timeout", ")", ")", ...
from interface Future
[ "from", "interface", "Future" ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/util/FutureResult.java#L67-L71
41,329
threerings/narya
core/src/main/java/com/threerings/presents/util/FutureResult.java
FutureResult.requestProcessed
public void requestProcessed (Object result) { @SuppressWarnings("unchecked") V value = (V)result; _sync.innerSet(value); }
java
public void requestProcessed (Object result) { @SuppressWarnings("unchecked") V value = (V)result; _sync.innerSet(value); }
[ "public", "void", "requestProcessed", "(", "Object", "result", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "V", "value", "=", "(", "V", ")", "result", ";", "_sync", ".", "innerSet", "(", "value", ")", ";", "}" ]
from interface InvocationService.ResultListener
[ "from", "interface", "InvocationService", ".", "ResultListener" ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/util/FutureResult.java#L74-L78
41,330
threerings/narya
core/src/main/java/com/threerings/admin/client/TabbedDSetEditor.java
TabbedDSetEditor.createEditor
protected DSetEditor<E> createEditor ( DObject setter, String setName, Class<?> entryClass, String[] editableFields, ObjectEditorTable.FieldInterpreter interp, EntryGrouper<E> grouper, String group) { return new DSetEditor<E>(setter, setName, entryClass, editableFields, inter...
java
protected DSetEditor<E> createEditor ( DObject setter, String setName, Class<?> entryClass, String[] editableFields, ObjectEditorTable.FieldInterpreter interp, EntryGrouper<E> grouper, String group) { return new DSetEditor<E>(setter, setName, entryClass, editableFields, inter...
[ "protected", "DSetEditor", "<", "E", ">", "createEditor", "(", "DObject", "setter", ",", "String", "setName", ",", "Class", "<", "?", ">", "entryClass", ",", "String", "[", "]", "editableFields", ",", "ObjectEditorTable", ".", "FieldInterpreter", "interp", ","...
Creates a DSetEditor for displaying the given group.
[ "Creates", "a", "DSetEditor", "for", "displaying", "the", "given", "group", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/admin/client/TabbedDSetEditor.java#L213-L219
41,331
threerings/narya
core/src/main/java/com/threerings/presents/peer/server/persist/NodeRecord.java
NodeRecord.getPeerHostName
public String getPeerHostName (String region) { return (ALWAYS_CONNECT_INTERNAL || Objects.equal(this.region, region)) ? hostName : publicHostName; }
java
public String getPeerHostName (String region) { return (ALWAYS_CONNECT_INTERNAL || Objects.equal(this.region, region)) ? hostName : publicHostName; }
[ "public", "String", "getPeerHostName", "(", "String", "region", ")", "{", "return", "(", "ALWAYS_CONNECT_INTERNAL", "||", "Objects", ".", "equal", "(", "this", ".", "region", ",", "region", ")", ")", "?", "hostName", ":", "publicHostName", ";", "}" ]
Returns the host name to which peers in the specified region should connect.
[ "Returns", "the", "host", "name", "to", "which", "peers", "in", "the", "specified", "region", "should", "connect", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/peer/server/persist/NodeRecord.java#L117-L122
41,332
threerings/narya
core/src/main/java/com/threerings/presents/client/Client.java
Client.setClassLoader
public void setClassLoader (ClassLoader loader) { _loader = loader; if (_comm != null) { _comm.setClassLoader(loader); } }
java
public void setClassLoader (ClassLoader loader) { _loader = loader; if (_comm != null) { _comm.setClassLoader(loader); } }
[ "public", "void", "setClassLoader", "(", "ClassLoader", "loader", ")", "{", "_loader", "=", "loader", ";", "if", "(", "_comm", "!=", "null", ")", "{", "_comm", ".", "setClassLoader", "(", "loader", ")", ";", "}", "}" ]
Configures the client with a custom class loader which will be used when reading objects off of the network.
[ "Configures", "the", "client", "with", "a", "custom", "class", "loader", "which", "will", "be", "used", "when", "reading", "objects", "off", "of", "the", "network", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/Client.java#L292-L298
41,333
threerings/narya
core/src/main/java/com/threerings/presents/client/Client.java
Client.registerFlushDelay
public void registerFlushDelay (Class<?> objclass, long delay) { ClientDObjectMgr omgr = (ClientDObjectMgr)getDObjectManager(); omgr.registerFlushDelay(objclass, delay); }
java
public void registerFlushDelay (Class<?> objclass, long delay) { ClientDObjectMgr omgr = (ClientDObjectMgr)getDObjectManager(); omgr.registerFlushDelay(objclass, delay); }
[ "public", "void", "registerFlushDelay", "(", "Class", "<", "?", ">", "objclass", ",", "long", "delay", ")", "{", "ClientDObjectMgr", "omgr", "=", "(", "ClientDObjectMgr", ")", "getDObjectManager", "(", ")", ";", "omgr", ".", "registerFlushDelay", "(", "objclas...
Instructs the distributed object manager associated with this client to allow objects of the specified class to linger around the specified number of milliseconds after their last subscriber has been removed before the client finally removes its object proxy and flushes the object. Normally, objects are flushed immedia...
[ "Instructs", "the", "distributed", "object", "manager", "associated", "with", "this", "client", "to", "allow", "objects", "of", "the", "specified", "class", "to", "linger", "around", "the", "specified", "number", "of", "milliseconds", "after", "their", "last", "...
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/Client.java#L344-L348
41,334
threerings/narya
core/src/main/java/com/threerings/presents/client/Client.java
Client.logon
public synchronized boolean logon () { // if we have a communicator reference, we're already logged on if (_comm != null) { return false; } // notify our observers immediately _observers.apply(new ObserverOps.Session(this) { @Override protected void n...
java
public synchronized boolean logon () { // if we have a communicator reference, we're already logged on if (_comm != null) { return false; } // notify our observers immediately _observers.apply(new ObserverOps.Session(this) { @Override protected void n...
[ "public", "synchronized", "boolean", "logon", "(", ")", "{", "// if we have a communicator reference, we're already logged on", "if", "(", "_comm", "!=", "null", ")", "{", "return", "false", ";", "}", "// notify our observers immediately", "_observers", ".", "apply", "(...
Requests that this client connect and logon to the server with which it was previously configured. @return false if we're already logged on, true if a logon attempt was initiated.
[ "Requests", "that", "this", "client", "connect", "and", "logon", "to", "the", "server", "with", "which", "it", "was", "previously", "configured", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/Client.java#L504-L537
41,335
threerings/narya
core/src/main/java/com/threerings/presents/client/Client.java
Client.logoff
public boolean logoff (boolean abortable) { // if we have no communicator, we're not logged on anyway if (_comm == null) { log.warning("Ignoring request to logoff because we're not logged on."); return true; } // if the request is abortable, let's run it past...
java
public boolean logoff (boolean abortable) { // if we have no communicator, we're not logged on anyway if (_comm == null) { log.warning("Ignoring request to logoff because we're not logged on."); return true; } // if the request is abortable, let's run it past...
[ "public", "boolean", "logoff", "(", "boolean", "abortable", ")", "{", "// if we have no communicator, we're not logged on anyway", "if", "(", "_comm", "==", "null", ")", "{", "log", ".", "warning", "(", "\"Ignoring request to logoff because we're not logged on.\"", ")", "...
Requests that the client log off of the server to which it is connected. @param abortable If true, the client will call <code>clientWillDisconnect</code> on all of the client observers and abort the logoff process if any of them return false. If false, <code>clientWillDisconnect</code> will not be called at all. @ret...
[ "Requests", "that", "the", "client", "log", "off", "of", "the", "server", "to", "which", "it", "is", "connected", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/Client.java#L588-L613
41,336
threerings/narya
core/src/main/java/com/threerings/presents/client/Client.java
Client.prepareStandaloneLogon
public String[] prepareStandaloneLogon () { _standalone = true; // notify our observers immediately _observers.apply(new ObserverOps.Session(this) { @Override protected void notify (SessionObserver obs) { obs.clientWillLogon(_client); } }); ...
java
public String[] prepareStandaloneLogon () { _standalone = true; // notify our observers immediately _observers.apply(new ObserverOps.Session(this) { @Override protected void notify (SessionObserver obs) { obs.clientWillLogon(_client); } }); ...
[ "public", "String", "[", "]", "prepareStandaloneLogon", "(", ")", "{", "_standalone", "=", "true", ";", "// notify our observers immediately", "_observers", ".", "apply", "(", "new", "ObserverOps", ".", "Session", "(", "this", ")", "{", "@", "Override", "protect...
Prepares the client for a standalone mode logon. Returns the set of bootstrap service groups that should be supplied to the invocation manager to create our fake bootstrap record.
[ "Prepares", "the", "client", "for", "a", "standalone", "mode", "logon", ".", "Returns", "the", "set", "of", "bootstrap", "service", "groups", "that", "should", "be", "supplied", "to", "the", "invocation", "manager", "to", "create", "our", "fake", "bootstrap", ...
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/Client.java#L619-L629
41,337
threerings/narya
core/src/main/java/com/threerings/presents/client/Client.java
Client.standaloneLogon
public void standaloneLogon (BootstrapData data, DObjectManager omgr) { if (!_standalone) { throw new IllegalStateException("Must call prepareStandaloneLogon() first."); } gotBootstrap(data, omgr); }
java
public void standaloneLogon (BootstrapData data, DObjectManager omgr) { if (!_standalone) { throw new IllegalStateException("Must call prepareStandaloneLogon() first."); } gotBootstrap(data, omgr); }
[ "public", "void", "standaloneLogon", "(", "BootstrapData", "data", ",", "DObjectManager", "omgr", ")", "{", "if", "(", "!", "_standalone", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Must call prepareStandaloneLogon() first.\"", ")", ";", "}", "gotBoo...
Logs this client on in standalone mode with the faked bootstrap data and shared local distributed object manager.
[ "Logs", "this", "client", "on", "in", "standalone", "mode", "with", "the", "faked", "bootstrap", "data", "and", "shared", "local", "distributed", "object", "manager", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/Client.java#L635-L641
41,338
threerings/narya
core/src/main/java/com/threerings/presents/client/Client.java
Client.standaloneLogoff
public void standaloneLogoff () { notifyObservers(new ObserverOps.Session(this) { @Override protected void notify (SessionObserver obs) { obs.clientDidLogoff(_client); } }); cleanup(null); // this will set _standalone to false }
java
public void standaloneLogoff () { notifyObservers(new ObserverOps.Session(this) { @Override protected void notify (SessionObserver obs) { obs.clientDidLogoff(_client); } }); cleanup(null); // this will set _standalone to false }
[ "public", "void", "standaloneLogoff", "(", ")", "{", "notifyObservers", "(", "new", "ObserverOps", ".", "Session", "(", "this", ")", "{", "@", "Override", "protected", "void", "notify", "(", "SessionObserver", "obs", ")", "{", "obs", ".", "clientDidLogoff", ...
For standalone mode, this notifies observers that the client has logged off and cleans up.
[ "For", "standalone", "mode", "this", "notifies", "observers", "that", "the", "client", "has", "logged", "off", "and", "cleans", "up", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/Client.java#L646-L654
41,339
threerings/narya
core/src/main/java/com/threerings/presents/client/Client.java
Client.setOutgoingMessageThrottle
protected synchronized void setOutgoingMessageThrottle (int msgsPerSec) { log.info("Updating outgoing message throttle", "msgsPerSec", msgsPerSec); _outThrottle.reinit(msgsPerSec, 1000L); _comm.postMessage(new ThrottleUpdatedMessage()); }
java
protected synchronized void setOutgoingMessageThrottle (int msgsPerSec) { log.info("Updating outgoing message throttle", "msgsPerSec", msgsPerSec); _outThrottle.reinit(msgsPerSec, 1000L); _comm.postMessage(new ThrottleUpdatedMessage()); }
[ "protected", "synchronized", "void", "setOutgoingMessageThrottle", "(", "int", "msgsPerSec", ")", "{", "log", ".", "info", "(", "\"Updating outgoing message throttle\"", ",", "\"msgsPerSec\"", ",", "msgsPerSec", ")", ";", "_outThrottle", ".", "reinit", "(", "msgsPerSe...
Configures the outgoing message throttle. This is done when the server informs us that a new rate is in effect.
[ "Configures", "the", "outgoing", "message", "throttle", ".", "This", "is", "done", "when", "the", "server", "informs", "us", "that", "a", "new", "rate", "is", "in", "effect", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/Client.java#L744-L749
41,340
threerings/narya
core/src/main/java/com/threerings/presents/client/Client.java
Client.tick
protected void tick () { // if we're not connected, skip it if (_comm == null) { return; } long now = RunAnywhere.currentTimeMillis(); if (_dcalc != null) { // if our current calculator is done, clear it out if (_dcalc.isDone()) { ...
java
protected void tick () { // if we're not connected, skip it if (_comm == null) { return; } long now = RunAnywhere.currentTimeMillis(); if (_dcalc != null) { // if our current calculator is done, clear it out if (_dcalc.isDone()) { ...
[ "protected", "void", "tick", "(", ")", "{", "// if we're not connected, skip it", "if", "(", "_comm", "==", "null", ")", "{", "return", ";", "}", "long", "now", "=", "RunAnywhere", ".", "currentTimeMillis", "(", ")", ";", "if", "(", "_dcalc", "!=", "null",...
Called every five seconds; ensures that we ping the server if we haven't communicated in a long while and periodically resyncs the client and server clock deltas.
[ "Called", "every", "five", "seconds", ";", "ensures", "that", "we", "ping", "the", "server", "if", "we", "haven", "t", "communicated", "in", "a", "long", "while", "and", "periodically", "resyncs", "the", "client", "and", "server", "clock", "deltas", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/Client.java#L771-L802
41,341
threerings/narya
core/src/main/java/com/threerings/presents/client/Client.java
Client.gotClientObject
protected void gotClientObject (ClientObject clobj) { // keep this around _clobj = clobj; // let the client know that logon has now fully succeeded notifyObservers(new ObserverOps.Session(this) { @Override protected void notify (SessionObserver obs) { obs...
java
protected void gotClientObject (ClientObject clobj) { // keep this around _clobj = clobj; // let the client know that logon has now fully succeeded notifyObservers(new ObserverOps.Session(this) { @Override protected void notify (SessionObserver obs) { obs...
[ "protected", "void", "gotClientObject", "(", "ClientObject", "clobj", ")", "{", "// keep this around", "_clobj", "=", "clobj", ";", "// let the client know that logon has now fully succeeded", "notifyObservers", "(", "new", "ObserverOps", ".", "Session", "(", "this", ")",...
Called by the invocation director when it successfully subscribes to the client object immediately following logon.
[ "Called", "by", "the", "invocation", "director", "when", "it", "successfully", "subscribes", "to", "the", "client", "object", "immediately", "following", "logon", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/Client.java#L838-L849
41,342
threerings/narya
core/src/main/java/com/threerings/presents/client/Client.java
Client.getClientObjectFailed
protected void getClientObjectFailed (final Exception cause) { // pass the buck onto the listeners notifyObservers(new ObserverOps.Client(this) { @Override protected void notify (ClientObserver obs) { obs.clientFailedToLogon(_client, cause); } }); ...
java
protected void getClientObjectFailed (final Exception cause) { // pass the buck onto the listeners notifyObservers(new ObserverOps.Client(this) { @Override protected void notify (ClientObserver obs) { obs.clientFailedToLogon(_client, cause); } }); ...
[ "protected", "void", "getClientObjectFailed", "(", "final", "Exception", "cause", ")", "{", "// pass the buck onto the listeners", "notifyObservers", "(", "new", "ObserverOps", ".", "Client", "(", "this", ")", "{", "@", "Override", "protected", "void", "notify", "("...
Called by the invocation director if it fails to subscribe to the client object after logon.
[ "Called", "by", "the", "invocation", "director", "if", "it", "fails", "to", "subscribe", "to", "the", "client", "object", "after", "logon", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/Client.java#L854-L862
41,343
threerings/narya
core/src/main/java/com/threerings/presents/client/Client.java
Client.clientObjectDidChange
protected void clientObjectDidChange (ClientObject clobj) { _clobj = clobj; _cloid = _clobj.getOid(); // report to our observers notifyObservers(new ObserverOps.Session(this) { @Override protected void notify (SessionObserver obs) { obs.clientObjectDidCha...
java
protected void clientObjectDidChange (ClientObject clobj) { _clobj = clobj; _cloid = _clobj.getOid(); // report to our observers notifyObservers(new ObserverOps.Session(this) { @Override protected void notify (SessionObserver obs) { obs.clientObjectDidCha...
[ "protected", "void", "clientObjectDidChange", "(", "ClientObject", "clobj", ")", "{", "_clobj", "=", "clobj", ";", "_cloid", "=", "_clobj", ".", "getOid", "(", ")", ";", "// report to our observers", "notifyObservers", "(", "new", "ObserverOps", ".", "Session", ...
Called by the invocation director when it discovers that the client object has changed.
[ "Called", "by", "the", "invocation", "director", "when", "it", "discovers", "that", "the", "client", "object", "has", "changed", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/Client.java#L867-L878
41,344
xbib/marc
src/main/java/org/xbib/marc/MarcField.java
MarcField.getSubfield
public Deque<Subfield> getSubfield(String subfieldId) { return subfields.stream() .filter(subfield -> subfield.getId().equals(subfieldId)) .collect(Collectors.toCollection(LinkedList::new)); }
java
public Deque<Subfield> getSubfield(String subfieldId) { return subfields.stream() .filter(subfield -> subfield.getId().equals(subfieldId)) .collect(Collectors.toCollection(LinkedList::new)); }
[ "public", "Deque", "<", "Subfield", ">", "getSubfield", "(", "String", "subfieldId", ")", "{", "return", "subfields", ".", "stream", "(", ")", ".", "filter", "(", "subfield", "->", "subfield", ".", "getId", "(", ")", ".", "equals", "(", "subfieldId", ")"...
Return all subfields of a given subfield ID. Multiple occurences may occur. @param subfieldId subfield ID @return list of subfields
[ "Return", "all", "subfields", "of", "a", "given", "subfield", "ID", ".", "Multiple", "occurences", "may", "occur", "." ]
d8426fcfc686507cab59b3d8181b08f83718418c
https://github.com/xbib/marc/blob/d8426fcfc686507cab59b3d8181b08f83718418c/src/main/java/org/xbib/marc/MarcField.java#L151-L155
41,345
xbib/marc
src/main/java/org/xbib/marc/MarcField.java
MarcField.matchValue
public MarcField matchValue(Pattern pattern) { if (value != null && pattern.matcher(value).matches()) { return this; } for (Subfield subfield : subfields) { if (pattern.matcher(subfield.getValue()).matches()) { return this; } } ...
java
public MarcField matchValue(Pattern pattern) { if (value != null && pattern.matcher(value).matches()) { return this; } for (Subfield subfield : subfields) { if (pattern.matcher(subfield.getValue()).matches()) { return this; } } ...
[ "public", "MarcField", "matchValue", "(", "Pattern", "pattern", ")", "{", "if", "(", "value", "!=", "null", "&&", "pattern", ".", "matcher", "(", "value", ")", ".", "matches", "(", ")", ")", "{", "return", "this", ";", "}", "for", "(", "Subfield", "s...
Search for fields that match a pattern. @param pattern the pattern to match @return thhis MARC field if pattern matches, or null if not
[ "Search", "for", "fields", "that", "match", "a", "pattern", "." ]
d8426fcfc686507cab59b3d8181b08f83718418c
https://github.com/xbib/marc/blob/d8426fcfc686507cab59b3d8181b08f83718418c/src/main/java/org/xbib/marc/MarcField.java#L277-L287
41,346
xbib/marc
src/main/java/org/xbib/marc/MarcField.java
MarcField.toTagIndicatorKey
public String toTagIndicatorKey() { return (tag == null ? EMPTY_STRING : tag) + KEY_DELIMITER + (indicator == null ? EMPTY_STRING : indicator); }
java
public String toTagIndicatorKey() { return (tag == null ? EMPTY_STRING : tag) + KEY_DELIMITER + (indicator == null ? EMPTY_STRING : indicator); }
[ "public", "String", "toTagIndicatorKey", "(", ")", "{", "return", "(", "tag", "==", "null", "?", "EMPTY_STRING", ":", "tag", ")", "+", "KEY_DELIMITER", "+", "(", "indicator", "==", "null", "?", "EMPTY_STRING", ":", "indicator", ")", ";", "}" ]
A MARC field can be denoted by a key, independent of values. This key is a string, consisting of tag and indicator delimited by a dollar sign. @return the tag/indicator-based key of this MARC field
[ "A", "MARC", "field", "can", "be", "denoted", "by", "a", "key", "independent", "of", "values", ".", "This", "key", "is", "a", "string", "consisting", "of", "tag", "and", "indicator", "delimited", "by", "a", "dollar", "sign", "." ]
d8426fcfc686507cab59b3d8181b08f83718418c
https://github.com/xbib/marc/blob/d8426fcfc686507cab59b3d8181b08f83718418c/src/main/java/org/xbib/marc/MarcField.java#L305-L307
41,347
xbib/marc
src/main/java/org/xbib/marc/MarcField.java
MarcField.toKey
public String toKey() { return (tag == null ? EMPTY_STRING : tag) + KEY_DELIMITER + (indicator == null ? EMPTY_STRING : indicator) + KEY_DELIMITER + subfieldIds; }
java
public String toKey() { return (tag == null ? EMPTY_STRING : tag) + KEY_DELIMITER + (indicator == null ? EMPTY_STRING : indicator) + KEY_DELIMITER + subfieldIds; }
[ "public", "String", "toKey", "(", ")", "{", "return", "(", "tag", "==", "null", "?", "EMPTY_STRING", ":", "tag", ")", "+", "KEY_DELIMITER", "+", "(", "indicator", "==", "null", "?", "EMPTY_STRING", ":", "indicator", ")", "+", "KEY_DELIMITER", "+", "subfi...
A MARC field can be denoted by a key, independent of values. This key is a string, consisting of tag, indicator, subfield IDs, delimited by a dollar sign. @return the key of this MARC field
[ "A", "MARC", "field", "can", "be", "denoted", "by", "a", "key", "independent", "of", "values", ".", "This", "key", "is", "a", "string", "consisting", "of", "tag", "indicator", "subfield", "IDs", "delimited", "by", "a", "dollar", "sign", "." ]
d8426fcfc686507cab59b3d8181b08f83718418c
https://github.com/xbib/marc/blob/d8426fcfc686507cab59b3d8181b08f83718418c/src/main/java/org/xbib/marc/MarcField.java#L323-L326
41,348
threerings/narya
core/src/main/java/com/threerings/crowd/server/BodyManager.java
BodyManager.updateOccupantStatus
public void updateOccupantStatus (BodyObject body, final byte status) { // no need to NOOP if (body.status != status) { // update the status in their body object body.setStatus(status); body.getLocal(BodyLocal.class).statusTime = System.currentTimeMillis(); ...
java
public void updateOccupantStatus (BodyObject body, final byte status) { // no need to NOOP if (body.status != status) { // update the status in their body object body.setStatus(status); body.getLocal(BodyLocal.class).statusTime = System.currentTimeMillis(); ...
[ "public", "void", "updateOccupantStatus", "(", "BodyObject", "body", ",", "final", "byte", "status", ")", "{", "// no need to NOOP", "if", "(", "body", ".", "status", "!=", "status", ")", "{", "// update the status in their body object", "body", ".", "setStatus", ...
Updates the connection status for the given body object's occupant info in the specified location.
[ "Updates", "the", "connection", "status", "for", "the", "given", "body", "object", "s", "occupant", "info", "in", "the", "specified", "location", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/BodyManager.java#L68-L86
41,349
threerings/narya
core/src/main/java/com/threerings/crowd/server/BodyManager.java
BodyManager.setIdle
public void setIdle (ClientObject caller, boolean idle) { BodyObject bobj = _locator.forClient(caller); // determine the body's proposed new status byte nstatus = (idle) ? OccupantInfo.IDLE : OccupantInfo.ACTIVE; if (bobj == null || bobj.status == nstatus) { return; // i...
java
public void setIdle (ClientObject caller, boolean idle) { BodyObject bobj = _locator.forClient(caller); // determine the body's proposed new status byte nstatus = (idle) ? OccupantInfo.IDLE : OccupantInfo.ACTIVE; if (bobj == null || bobj.status == nstatus) { return; // i...
[ "public", "void", "setIdle", "(", "ClientObject", "caller", ",", "boolean", "idle", ")", "{", "BodyObject", "bobj", "=", "_locator", ".", "forClient", "(", "caller", ")", ";", "// determine the body's proposed new status", "byte", "nstatus", "=", "(", "idle", ")...
from interface BodyProvider
[ "from", "interface", "BodyProvider" ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/BodyManager.java#L89-L102
41,350
threerings/narya
core/src/main/java/com/threerings/presents/server/ReportingInvoker.java
ReportingInvoker.getStats
public Stats getStats (boolean snapshot) { synchronized (this) { if (snapshot) { _recent = _current; _current = new Stats(); _current.maxQueueSize = _queue.size(); } return _recent; } }
java
public Stats getStats (boolean snapshot) { synchronized (this) { if (snapshot) { _recent = _current; _current = new Stats(); _current.maxQueueSize = _queue.size(); } return _recent; } }
[ "public", "Stats", "getStats", "(", "boolean", "snapshot", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "snapshot", ")", "{", "_recent", "=", "_current", ";", "_current", "=", "new", "Stats", "(", ")", ";", "_current", ".", "maxQueueSize",...
Returns a recent snapshot of runtime statistics tracked by the invoker. @param snapshot if true, the current stats will be snapshotted and reset and the new snapshot will be returned. If false, the previous snapshot will be returned. If no snapshot has ever been taken, the current stats that have been accumulting sinc...
[ "Returns", "a", "recent", "snapshot", "of", "runtime", "statistics", "tracked", "by", "the", "invoker", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/ReportingInvoker.java#L62-L72
41,351
threerings/narya
core/src/main/java/com/threerings/util/Resulting.java
Resulting.requestProcessed
public final void requestProcessed (Object result) { @SuppressWarnings("unchecked") T casted = (T)result; requestCompleted(casted); }
java
public final void requestProcessed (Object result) { @SuppressWarnings("unchecked") T casted = (T)result; requestCompleted(casted); }
[ "public", "final", "void", "requestProcessed", "(", "Object", "result", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "T", "casted", "=", "(", "T", ")", "result", ";", "requestCompleted", "(", "casted", ")", ";", "}" ]
from InvocationService.ResultListener
[ "from", "InvocationService", ".", "ResultListener" ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/util/Resulting.java#L202-L206
41,352
threerings/narya
core/src/main/java/com/threerings/util/Resulting.java
Resulting.requestFailed
public void requestFailed (Exception cause) { if (_chain != null) { _chain.requestFailed(cause); } else if (_invChain != null) { _invChain.requestFailed((cause instanceof InvocationException) ? cause.getMessage() : InvocationCodes.INTERNAL_ERR...
java
public void requestFailed (Exception cause) { if (_chain != null) { _chain.requestFailed(cause); } else if (_invChain != null) { _invChain.requestFailed((cause instanceof InvocationException) ? cause.getMessage() : InvocationCodes.INTERNAL_ERR...
[ "public", "void", "requestFailed", "(", "Exception", "cause", ")", "{", "if", "(", "_chain", "!=", "null", ")", "{", "_chain", ".", "requestFailed", "(", "cause", ")", ";", "}", "else", "if", "(", "_invChain", "!=", "null", ")", "{", "_invChain", ".", ...
Override this to handle a request failed in your own way.
[ "Override", "this", "to", "handle", "a", "request", "failed", "in", "your", "own", "way", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/util/Resulting.java#L211-L238
41,353
threerings/narya
core/src/main/java/com/threerings/util/Resulting.java
Resulting.requestCompleted
public void requestCompleted (T result) { if (_chain != null) { _chain.requestCompleted(result); } else if (_invChain instanceof InvocationService.ResultListener) { ((InvocationService.ResultListener)_invChain).requestProcessed(result); } else if (_invChain instance...
java
public void requestCompleted (T result) { if (_chain != null) { _chain.requestCompleted(result); } else if (_invChain instanceof InvocationService.ResultListener) { ((InvocationService.ResultListener)_invChain).requestProcessed(result); } else if (_invChain instance...
[ "public", "void", "requestCompleted", "(", "T", "result", ")", "{", "if", "(", "_chain", "!=", "null", ")", "{", "_chain", ".", "requestCompleted", "(", "result", ")", ";", "}", "else", "if", "(", "_invChain", "instanceof", "InvocationService", ".", "Resul...
Override this to handle a request completion in your own way.
[ "Override", "this", "to", "handle", "a", "request", "completion", "in", "your", "own", "way", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/util/Resulting.java#L243-L254
41,354
threerings/narya
core/src/main/java/com/threerings/crowd/client/PlaceController.java
PlaceController.init
public void init (CrowdContext ctx, PlaceConfig config) { // keep these around _ctx = ctx; _config = config; // create our user interface _view = createPlaceView(_ctx); // initialize our delegates applyToDelegates(new DelegateOp(PlaceControllerDelegate.class...
java
public void init (CrowdContext ctx, PlaceConfig config) { // keep these around _ctx = ctx; _config = config; // create our user interface _view = createPlaceView(_ctx); // initialize our delegates applyToDelegates(new DelegateOp(PlaceControllerDelegate.class...
[ "public", "void", "init", "(", "CrowdContext", "ctx", ",", "PlaceConfig", "config", ")", "{", "// keep these around", "_ctx", "=", "ctx", ";", "_config", "=", "config", ";", "// create our user interface", "_view", "=", "createPlaceView", "(", "_ctx", ")", ";", ...
Initializes this place controller with a reference to the context that they can use to access client services and to the configuration record for this place. The controller should create as much of its user interface that it can without having access to the place object because this will be invoked in parallel with the...
[ "Initializes", "this", "place", "controller", "with", "a", "reference", "to", "the", "context", "that", "they", "can", "use", "to", "access", "client", "services", "and", "to", "the", "configuration", "record", "for", "this", "place", ".", "The", "controller",...
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/client/PlaceController.java#L73-L92
41,355
threerings/narya
core/src/main/java/com/threerings/crowd/client/PlaceController.java
PlaceController.addDelegate
protected void addDelegate (PlaceControllerDelegate delegate) { if (_delegates == null) { _delegates = Lists.newArrayList(); } _delegates.add(delegate); }
java
protected void addDelegate (PlaceControllerDelegate delegate) { if (_delegates == null) { _delegates = Lists.newArrayList(); } _delegates.add(delegate); }
[ "protected", "void", "addDelegate", "(", "PlaceControllerDelegate", "delegate", ")", "{", "if", "(", "_delegates", "==", "null", ")", "{", "_delegates", "=", "Lists", ".", "newArrayList", "(", ")", ";", "}", "_delegates", ".", "add", "(", "delegate", ")", ...
Adds the supplied delegate to the list for this controller.
[ "Adds", "the", "supplied", "delegate", "to", "the", "list", "for", "this", "controller", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/client/PlaceController.java#L238-L244
41,356
threerings/narya
core/src/main/java/com/threerings/admin/client/ConfigObjectManager.java
ConfigObjectManager.gotConfigInfo
public void gotConfigInfo (String[] keys, int[] oids) { _csubscribers = new ConfigObjectSubscriber[keys.length]; for (int ii = 0; ii < keys.length; ii++) { _csubscribers[ii] = new ConfigObjectSubscriber(); _csubscribers[ii].subscribeConfig(keys[ii], oids[ii]); } }
java
public void gotConfigInfo (String[] keys, int[] oids) { _csubscribers = new ConfigObjectSubscriber[keys.length]; for (int ii = 0; ii < keys.length; ii++) { _csubscribers[ii] = new ConfigObjectSubscriber(); _csubscribers[ii].subscribeConfig(keys[ii], oids[ii]); } }
[ "public", "void", "gotConfigInfo", "(", "String", "[", "]", "keys", ",", "int", "[", "]", "oids", ")", "{", "_csubscribers", "=", "new", "ConfigObjectSubscriber", "[", "keys", ".", "length", "]", ";", "for", "(", "int", "ii", "=", "0", ";", "ii", "<"...
documentation inherited from interface AdminService.ConfigInfoListener
[ "documentation", "inherited", "from", "interface", "AdminService", ".", "ConfigInfoListener" ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/admin/client/ConfigObjectManager.java#L78-L85
41,357
xbib/marc
src/main/java/org/xbib/marc/MarcRecord.java
MarcRecord.getFields
public List<MarcField> getFields(String tag) { return marcFields.stream().filter(marcField -> marcField.getTag().equals(tag)) .collect(Collectors.toList()); }
java
public List<MarcField> getFields(String tag) { return marcFields.stream().filter(marcField -> marcField.getTag().equals(tag)) .collect(Collectors.toList()); }
[ "public", "List", "<", "MarcField", ">", "getFields", "(", "String", "tag", ")", "{", "return", "marcFields", ".", "stream", "(", ")", ".", "filter", "(", "marcField", "->", "marcField", ".", "getTag", "(", ")", ".", "equals", "(", "tag", ")", ")", "...
Return the MARC fields of this record with a given tag. @param tag the MARC tag @return the MARC field list matching the given tag.
[ "Return", "the", "MARC", "fields", "of", "this", "record", "with", "a", "given", "tag", "." ]
d8426fcfc686507cab59b3d8181b08f83718418c
https://github.com/xbib/marc/blob/d8426fcfc686507cab59b3d8181b08f83718418c/src/main/java/org/xbib/marc/MarcRecord.java#L121-L124
41,358
xbib/marc
src/main/java/org/xbib/marc/MarcRecord.java
MarcRecord.filterKey
public List<MarcField> filterKey(Pattern pattern) { return marcFields.stream() .map(field -> field.matchKey(pattern)) .filter(Objects::nonNull) .collect(Collectors.toList()); }
java
public List<MarcField> filterKey(Pattern pattern) { return marcFields.stream() .map(field -> field.matchKey(pattern)) .filter(Objects::nonNull) .collect(Collectors.toList()); }
[ "public", "List", "<", "MarcField", ">", "filterKey", "(", "Pattern", "pattern", ")", "{", "return", "marcFields", ".", "stream", "(", ")", ".", "map", "(", "field", "->", "field", ".", "matchKey", "(", "pattern", ")", ")", ".", "filter", "(", "Objects...
Return a list of MARC fields of this record where key pattern matches were found. @param pattern the pattern @return a list of MARC fields
[ "Return", "a", "list", "of", "MARC", "fields", "of", "this", "record", "where", "key", "pattern", "matches", "were", "found", "." ]
d8426fcfc686507cab59b3d8181b08f83718418c
https://github.com/xbib/marc/blob/d8426fcfc686507cab59b3d8181b08f83718418c/src/main/java/org/xbib/marc/MarcRecord.java#L132-L137
41,359
xbib/marc
src/main/java/org/xbib/marc/MarcRecord.java
MarcRecord.filterValue
public List<MarcField> filterValue(Pattern pattern) { return marcFields.stream().map(field -> field.matchValue(pattern)).filter(Objects::nonNull).collect(Collectors.toList()); }
java
public List<MarcField> filterValue(Pattern pattern) { return marcFields.stream().map(field -> field.matchValue(pattern)).filter(Objects::nonNull).collect(Collectors.toList()); }
[ "public", "List", "<", "MarcField", ">", "filterValue", "(", "Pattern", "pattern", ")", "{", "return", "marcFields", ".", "stream", "(", ")", ".", "map", "(", "field", "->", "field", ".", "matchValue", "(", "pattern", ")", ")", ".", "filter", "(", "Obj...
Return a list of MARC fields of this record where pattern matches were found. @param pattern the pattern @return a list of MARC fields
[ "Return", "a", "list", "of", "MARC", "fields", "of", "this", "record", "where", "pattern", "matches", "were", "found", "." ]
d8426fcfc686507cab59b3d8181b08f83718418c
https://github.com/xbib/marc/blob/d8426fcfc686507cab59b3d8181b08f83718418c/src/main/java/org/xbib/marc/MarcRecord.java#L145-L148
41,360
threerings/narya
core/src/main/java/com/threerings/presents/server/SessionFactory.java
SessionFactory.newSessionFactory
public static SessionFactory newSessionFactory ( final Class<? extends Credentials> credsClass, final Class<? extends PresentsSession> sessionClass, final Class<? extends Name> nameClass, final Class<? extends ClientResolver> resolverClass) { return new SessionFactory() { ...
java
public static SessionFactory newSessionFactory ( final Class<? extends Credentials> credsClass, final Class<? extends PresentsSession> sessionClass, final Class<? extends Name> nameClass, final Class<? extends ClientResolver> resolverClass) { return new SessionFactory() { ...
[ "public", "static", "SessionFactory", "newSessionFactory", "(", "final", "Class", "<", "?", "extends", "Credentials", ">", "credsClass", ",", "final", "Class", "<", "?", "extends", "PresentsSession", ">", "sessionClass", ",", "final", "Class", "<", "?", "extends...
Creates a session factory that handles clients with the supplied credentials and authentication name.
[ "Creates", "a", "session", "factory", "that", "handles", "clients", "with", "the", "supplied", "credentials", "and", "authentication", "name", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/SessionFactory.java#L49-L64
41,361
threerings/narya
core/src/main/java/com/threerings/presents/client/InvocationDirector.java
InvocationDirector.init
public void init (DObjectManager omgr, final int cloid, Client client) { // sanity check if (_clobj != null) { log.warning("Zoiks, client object around during invmgr init!"); cleanup(); } // keep these for later _omgr = omgr; _client = client;...
java
public void init (DObjectManager omgr, final int cloid, Client client) { // sanity check if (_clobj != null) { log.warning("Zoiks, client object around during invmgr init!"); cleanup(); } // keep these for later _omgr = omgr; _client = client;...
[ "public", "void", "init", "(", "DObjectManager", "omgr", ",", "final", "int", "cloid", ",", "Client", "client", ")", "{", "// sanity check", "if", "(", "_clobj", "!=", "null", ")", "{", "log", ".", "warning", "(", "\"Zoiks, client object around during invmgr ini...
Initializes the invocation director. This is called when the client establishes a connection with the server. @param omgr the distributed object manager via which the invocation manager will send and receive events. @param cloid the oid of the object on which invocation notifications as well as invocation responses wi...
[ "Initializes", "the", "invocation", "director", ".", "This", "is", "called", "when", "the", "client", "establishes", "a", "connection", "with", "the", "server", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/InvocationDirector.java#L65-L101
41,362
threerings/narya
core/src/main/java/com/threerings/presents/client/InvocationDirector.java
InvocationDirector.registerReceiver
public void registerReceiver (InvocationDecoder decoder) { // add the receiver to the list _reclist.add(decoder); // if we're already online, assign a receiver id to this decoder if (_clobj != null) { assignReceiverId(decoder); } }
java
public void registerReceiver (InvocationDecoder decoder) { // add the receiver to the list _reclist.add(decoder); // if we're already online, assign a receiver id to this decoder if (_clobj != null) { assignReceiverId(decoder); } }
[ "public", "void", "registerReceiver", "(", "InvocationDecoder", "decoder", ")", "{", "// add the receiver to the list", "_reclist", ".", "add", "(", "decoder", ")", ";", "// if we're already online, assign a receiver id to this decoder", "if", "(", "_clobj", "!=", "null", ...
Registers an invocation notification receiver by way of its notification event decoder.
[ "Registers", "an", "invocation", "notification", "receiver", "by", "way", "of", "its", "notification", "event", "decoder", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/InvocationDirector.java#L131-L140
41,363
threerings/narya
core/src/main/java/com/threerings/presents/client/InvocationDirector.java
InvocationDirector.unregisterReceiver
public void unregisterReceiver (String receiverCode) { // remove the receiver from the list for (Iterator<InvocationDecoder> iter = _reclist.iterator(); iter.hasNext(); ) { InvocationDecoder decoder = iter.next(); if (decoder.getReceiverCode().equals(receiverCode)) { ...
java
public void unregisterReceiver (String receiverCode) { // remove the receiver from the list for (Iterator<InvocationDecoder> iter = _reclist.iterator(); iter.hasNext(); ) { InvocationDecoder decoder = iter.next(); if (decoder.getReceiverCode().equals(receiverCode)) { ...
[ "public", "void", "unregisterReceiver", "(", "String", "receiverCode", ")", "{", "// remove the receiver from the list", "for", "(", "Iterator", "<", "InvocationDecoder", ">", "iter", "=", "_reclist", ".", "iterator", "(", ")", ";", "iter", ".", "hasNext", "(", ...
Removes a receiver registration.
[ "Removes", "a", "receiver", "registration", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/InvocationDirector.java#L145-L168
41,364
threerings/narya
core/src/main/java/com/threerings/presents/client/InvocationDirector.java
InvocationDirector.assignReceiverIds
protected void assignReceiverIds () { // pack all the events into a single transaction _clobj.startTransaction(); try { // clear out our previous registrations _clobj.setReceivers(new DSet<Registration>()); for (InvocationDecoder decoder : _reclist) { ...
java
protected void assignReceiverIds () { // pack all the events into a single transaction _clobj.startTransaction(); try { // clear out our previous registrations _clobj.setReceivers(new DSet<Registration>()); for (InvocationDecoder decoder : _reclist) { ...
[ "protected", "void", "assignReceiverIds", "(", ")", "{", "// pack all the events into a single transaction", "_clobj", ".", "startTransaction", "(", ")", ";", "try", "{", "// clear out our previous registrations", "_clobj", ".", "setReceivers", "(", "new", "DSet", "<", ...
Called when we log on; generates mappings for all receivers registered prior to logon.
[ "Called", "when", "we", "log", "on", ";", "generates", "mappings", "for", "all", "receivers", "registered", "prior", "to", "logon", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/InvocationDirector.java#L173-L187
41,365
threerings/narya
core/src/main/java/com/threerings/presents/client/InvocationDirector.java
InvocationDirector.eventReceived
public void eventReceived (DEvent event) { if (event instanceof InvocationResponseEvent) { InvocationResponseEvent ire = (InvocationResponseEvent)event; handleInvocationResponse(ire.getRequestId(), ire.getMethodId(), ire.getArgs()); } else if (event instanceof InvocationNoti...
java
public void eventReceived (DEvent event) { if (event instanceof InvocationResponseEvent) { InvocationResponseEvent ire = (InvocationResponseEvent)event; handleInvocationResponse(ire.getRequestId(), ire.getMethodId(), ire.getArgs()); } else if (event instanceof InvocationNoti...
[ "public", "void", "eventReceived", "(", "DEvent", "event", ")", "{", "if", "(", "event", "instanceof", "InvocationResponseEvent", ")", "{", "InvocationResponseEvent", "ire", "=", "(", "InvocationResponseEvent", ")", "event", ";", "handleInvocationResponse", "(", "ir...
Process notification and response events arriving on user object.
[ "Process", "notification", "and", "response", "events", "arriving", "on", "user", "object", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/InvocationDirector.java#L257-L273
41,366
threerings/narya
core/src/main/java/com/threerings/presents/client/InvocationDirector.java
InvocationDirector.handleInvocationResponse
protected void handleInvocationResponse (int reqId, int methodId, Object[] args) { // look up the invocation marshaller registered for that response ListenerMarshaller listener = _listeners.remove(reqId); if (listener == null) { log.warning("Received invocation response for which...
java
protected void handleInvocationResponse (int reqId, int methodId, Object[] args) { // look up the invocation marshaller registered for that response ListenerMarshaller listener = _listeners.remove(reqId); if (listener == null) { log.warning("Received invocation response for which...
[ "protected", "void", "handleInvocationResponse", "(", "int", "reqId", ",", "int", "methodId", ",", "Object", "[", "]", "args", ")", "{", "// look up the invocation marshaller registered for that response", "ListenerMarshaller", "listener", "=", "_listeners", ".", "remove"...
Dispatches an invocation response.
[ "Dispatches", "an", "invocation", "response", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/InvocationDirector.java#L278-L307
41,367
threerings/narya
core/src/main/java/com/threerings/presents/client/InvocationDirector.java
InvocationDirector.handleInvocationNotification
protected void handleInvocationNotification (int receiverId, int methodId, Object[] args) { // look up the decoder registered for this receiver InvocationDecoder decoder = _receivers.get(receiverId); if (decoder == null) { log.warning("Received notification for which we have no r...
java
protected void handleInvocationNotification (int receiverId, int methodId, Object[] args) { // look up the decoder registered for this receiver InvocationDecoder decoder = _receivers.get(receiverId); if (decoder == null) { log.warning("Received notification for which we have no r...
[ "protected", "void", "handleInvocationNotification", "(", "int", "receiverId", ",", "int", "methodId", ",", "Object", "[", "]", "args", ")", "{", "// look up the decoder registered for this receiver", "InvocationDecoder", "decoder", "=", "_receivers", ".", "get", "(", ...
Dispatches an invocation notification.
[ "Dispatches", "an", "invocation", "notification", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/InvocationDirector.java#L312-L331
41,368
threerings/narya
core/src/main/java/com/threerings/presents/client/InvocationDirector.java
InvocationDirector.handleClientObjectChanged
protected void handleClientObjectChanged (int newCloid) { // subscribe to the new client object _omgr.subscribeToObject(newCloid, new Subscriber<ClientObject>() { public void objectAvailable (ClientObject clobj) { // grab a reference to our old receiver registrations ...
java
protected void handleClientObjectChanged (int newCloid) { // subscribe to the new client object _omgr.subscribeToObject(newCloid, new Subscriber<ClientObject>() { public void objectAvailable (ClientObject clobj) { // grab a reference to our old receiver registrations ...
[ "protected", "void", "handleClientObjectChanged", "(", "int", "newCloid", ")", "{", "// subscribe to the new client object", "_omgr", ".", "subscribeToObject", "(", "newCloid", ",", "new", "Subscriber", "<", "ClientObject", ">", "(", ")", "{", "public", "void", "obj...
Called when the server has informed us that our previous client object is going the way of the Dodo because we're changing screen names. We subscribe to the new object and report to the client once we've got our hands on it.
[ "Called", "when", "the", "server", "has", "informed", "us", "that", "our", "previous", "client", "object", "is", "going", "the", "way", "of", "the", "Dodo", "because", "we", "re", "changing", "screen", "names", ".", "We", "subscribe", "to", "the", "new", ...
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/InvocationDirector.java#L338-L372
41,369
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceRegistry.java
PlaceRegistry.createPlace
public PlaceManager createPlace (PlaceConfig config) throws InstantiationException, InvocationException { return createPlace(config, null, null); }
java
public PlaceManager createPlace (PlaceConfig config) throws InstantiationException, InvocationException { return createPlace(config, null, null); }
[ "public", "PlaceManager", "createPlace", "(", "PlaceConfig", "config", ")", "throws", "InstantiationException", ",", "InvocationException", "{", "return", "createPlace", "(", "config", ",", "null", ",", "null", ")", ";", "}" ]
Creates and registers a new place manager with no delegates. @see #createPlace(PlaceConfig,List)
[ "Creates", "and", "registers", "a", "new", "place", "manager", "with", "no", "delegates", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceRegistry.java#L82-L86
41,370
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceRegistry.java
PlaceRegistry.createPlace
public PlaceManager createPlace (PlaceConfig config, List<PlaceManagerDelegate> delegates) throws InstantiationException, InvocationException { return createPlace(config, delegates, null); }
java
public PlaceManager createPlace (PlaceConfig config, List<PlaceManagerDelegate> delegates) throws InstantiationException, InvocationException { return createPlace(config, delegates, null); }
[ "public", "PlaceManager", "createPlace", "(", "PlaceConfig", "config", ",", "List", "<", "PlaceManagerDelegate", ">", "delegates", ")", "throws", "InstantiationException", ",", "InvocationException", "{", "return", "createPlace", "(", "config", ",", "delegates", ",", ...
Creates and registers a new place manager along with the place object to be managed. The registry takes care of tracking the creation of the object and informing the manager when it is created. @param config the configuration object for the place to be created. The {@link PlaceManager} derived class that should be ins...
[ "Creates", "and", "registers", "a", "new", "place", "manager", "along", "with", "the", "place", "object", "to", "be", "managed", ".", "The", "registry", "takes", "care", "of", "tracking", "the", "creation", "of", "the", "object", "and", "informing", "the", ...
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceRegistry.java#L109-L113
41,371
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceRegistry.java
PlaceRegistry.enumeratePlaces
public Iterator<PlaceObject> enumeratePlaces () { final Iterator<PlaceManager> itr = _pmgrs.values().iterator(); return new Iterator<PlaceObject>() { public boolean hasNext () { return itr.hasNext(); } public PlaceObject next () { P...
java
public Iterator<PlaceObject> enumeratePlaces () { final Iterator<PlaceManager> itr = _pmgrs.values().iterator(); return new Iterator<PlaceObject>() { public boolean hasNext () { return itr.hasNext(); } public PlaceObject next () { P...
[ "public", "Iterator", "<", "PlaceObject", ">", "enumeratePlaces", "(", ")", "{", "final", "Iterator", "<", "PlaceManager", ">", "itr", "=", "_pmgrs", ".", "values", "(", ")", ".", "iterator", "(", ")", ";", "return", "new", "Iterator", "<", "PlaceObject", ...
Returns an enumeration of all of the registered place objects. This should only be accessed on the dobjmgr thread and shouldn't be kept around across event dispatches.
[ "Returns", "an", "enumeration", "of", "all", "of", "the", "registered", "place", "objects", ".", "This", "should", "only", "be", "accessed", "on", "the", "dobjmgr", "thread", "and", "shouldn", "t", "be", "kept", "around", "across", "event", "dispatches", "."...
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceRegistry.java#L132-L147
41,372
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceRegistry.java
PlaceRegistry.createPlace
protected PlaceManager createPlace (PlaceConfig config, List<PlaceManagerDelegate> delegates, PreStartupHook hook) throws InstantiationException, InvocationException { PlaceManager pmgr = null; try { // create a place manager using the cla...
java
protected PlaceManager createPlace (PlaceConfig config, List<PlaceManagerDelegate> delegates, PreStartupHook hook) throws InstantiationException, InvocationException { PlaceManager pmgr = null; try { // create a place manager using the cla...
[ "protected", "PlaceManager", "createPlace", "(", "PlaceConfig", "config", ",", "List", "<", "PlaceManagerDelegate", ">", "delegates", ",", "PreStartupHook", "hook", ")", "throws", "InstantiationException", ",", "InvocationException", "{", "PlaceManager", "pmgr", "=", ...
Creates a place manager using the supplied config, injects dependencies into and registers the supplied list of delegates, runs the supplied pre-startup hook and finally returns it.
[ "Creates", "a", "place", "manager", "using", "the", "supplied", "config", "injects", "dependencies", "into", "and", "registers", "the", "supplied", "list", "of", "delegates", "runs", "the", "supplied", "pre", "-", "startup", "hook", "and", "finally", "returns", ...
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceRegistry.java#L176-L229
41,373
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceRegistry.java
PlaceRegistry.unmapPlaceManager
protected void unmapPlaceManager (PlaceManager pmgr) { int ploid = pmgr.getPlaceObject().getOid(); // remove it from the table if (_pmgrs.remove(ploid) == null) { log.warning("Requested to unmap unmapped place manager", "pmgr", pmgr); // } else { // Log.info(...
java
protected void unmapPlaceManager (PlaceManager pmgr) { int ploid = pmgr.getPlaceObject().getOid(); // remove it from the table if (_pmgrs.remove(ploid) == null) { log.warning("Requested to unmap unmapped place manager", "pmgr", pmgr); // } else { // Log.info(...
[ "protected", "void", "unmapPlaceManager", "(", "PlaceManager", "pmgr", ")", "{", "int", "ploid", "=", "pmgr", ".", "getPlaceObject", "(", ")", ".", "getOid", "(", ")", ";", "// remove it from the table", "if", "(", "_pmgrs", ".", "remove", "(", "ploid", ")",...
Called by the place manager when it has been shut down.
[ "Called", "by", "the", "place", "manager", "when", "it", "has", "been", "shut", "down", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceRegistry.java#L256-L267
41,374
threerings/narya
core/src/main/java/com/threerings/io/Streamer.java
Streamer.isStreamable
public synchronized static boolean isStreamable (Class<?> target) { // if we have not yet initialized ourselves, do so now maybeInit(); // if we already have a streamer, or it's an enum, it's good if (_streamers.containsKey(target) || target.isEnum()) { return true; ...
java
public synchronized static boolean isStreamable (Class<?> target) { // if we have not yet initialized ourselves, do so now maybeInit(); // if we already have a streamer, or it's an enum, it's good if (_streamers.containsKey(target) || target.isEnum()) { return true; ...
[ "public", "synchronized", "static", "boolean", "isStreamable", "(", "Class", "<", "?", ">", "target", ")", "{", "// if we have not yet initialized ourselves, do so now", "maybeInit", "(", ")", ";", "// if we already have a streamer, or it's an enum, it's good", "if", "(", "...
Returns true if the supplied target class can be streamed using a streamer.
[ "Returns", "true", "if", "the", "supplied", "target", "class", "can", "be", "streamed", "using", "a", "streamer", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/io/Streamer.java#L69-L88
41,375
threerings/narya
core/src/main/java/com/threerings/io/Streamer.java
Streamer.getStreamerClass
public static Class<?> getStreamerClass (Object object) { return (object instanceof Enum<?>) ? ((Enum<?>)object).getDeclaringClass() : object.getClass(); }
java
public static Class<?> getStreamerClass (Object object) { return (object instanceof Enum<?>) ? ((Enum<?>)object).getDeclaringClass() : object.getClass(); }
[ "public", "static", "Class", "<", "?", ">", "getStreamerClass", "(", "Object", "object", ")", "{", "return", "(", "object", "instanceof", "Enum", "<", "?", ">", ")", "?", "(", "(", "Enum", "<", "?", ">", ")", "object", ")", ".", "getDeclaringClass", ...
Returns the class that should be used when streaming this object. In general that is the object's natural class, but for enum values, that might be its declaring class as enums use classes in a way that would otherwise pollute our id to class mapping space.
[ "Returns", "the", "class", "that", "should", "be", "used", "when", "streaming", "this", "object", ".", "In", "general", "that", "is", "the", "object", "s", "natural", "class", "but", "for", "enum", "values", "that", "might", "be", "its", "declaring", "clas...
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/io/Streamer.java#L95-L99
41,376
threerings/narya
core/src/main/java/com/threerings/io/Streamer.java
Streamer.getCollectionClass
public static Class<?> getCollectionClass (Class<?> clazz) { if (Streamable.class.isAssignableFrom(clazz)) { // the class is natively streamable, let's ignore it return null; } for (Class<?> collClass : BasicStreamers.CollectionStreamer.SPECIFICITY_ORDER) { ...
java
public static Class<?> getCollectionClass (Class<?> clazz) { if (Streamable.class.isAssignableFrom(clazz)) { // the class is natively streamable, let's ignore it return null; } for (Class<?> collClass : BasicStreamers.CollectionStreamer.SPECIFICITY_ORDER) { ...
[ "public", "static", "Class", "<", "?", ">", "getCollectionClass", "(", "Class", "<", "?", ">", "clazz", ")", "{", "if", "(", "Streamable", ".", "class", ".", "isAssignableFrom", "(", "clazz", ")", ")", "{", "// the class is natively streamable, let's ignore it",...
If the specified class is not Streamable and is a Collection type, return the most specific supported Collection interface type; otherwise return null.
[ "If", "the", "specified", "class", "is", "not", "Streamable", "and", "is", "a", "Collection", "type", "return", "the", "most", "specific", "supported", "Collection", "interface", "type", ";", "otherwise", "return", "null", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/io/Streamer.java#L105-L117
41,377
threerings/narya
core/src/main/java/com/threerings/io/Streamer.java
Streamer.create
protected static Streamer create (Class<?> target) throws IOException { // validate that the class is really streamable boolean isInner = false, isStatic = Modifier.isStatic(target.getModifiers()); try { isInner = (target.getDeclaringClass() != null); } catch (Thr...
java
protected static Streamer create (Class<?> target) throws IOException { // validate that the class is really streamable boolean isInner = false, isStatic = Modifier.isStatic(target.getModifiers()); try { isInner = (target.getDeclaringClass() != null); } catch (Thr...
[ "protected", "static", "Streamer", "create", "(", "Class", "<", "?", ">", "target", ")", "throws", "IOException", "{", "// validate that the class is really streamable", "boolean", "isInner", "=", "false", ",", "isStatic", "=", "Modifier", ".", "isStatic", "(", "t...
Create the appropriate Streamer for a newly-seen class.
[ "Create", "the", "appropriate", "Streamer", "for", "a", "newly", "-", "seen", "class", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/io/Streamer.java#L229-L317
41,378
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceManager.java
PlaceManager.applyToOccupants
public void applyToOccupants (OccupantOp op) { if (_plobj != null) { for (OccupantInfo info : _plobj.occupantInfo) { op.apply(info); } } }
java
public void applyToOccupants (OccupantOp op) { if (_plobj != null) { for (OccupantInfo info : _plobj.occupantInfo) { op.apply(info); } } }
[ "public", "void", "applyToOccupants", "(", "OccupantOp", "op", ")", "{", "if", "(", "_plobj", "!=", "null", ")", "{", "for", "(", "OccupantInfo", "info", ":", "_plobj", ".", "occupantInfo", ")", "{", "op", ".", "apply", "(", "info", ")", ";", "}", "}...
Applies the supplied occupant operation to each occupant currently present in this place.
[ "Applies", "the", "supplied", "occupant", "operation", "to", "each", "occupant", "currently", "present", "in", "this", "place", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceManager.java#L152-L159
41,379
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceManager.java
PlaceManager.init
public void init (PlaceRegistry registry, InvocationManager invmgr, RootDObjectManager omgr, BodyLocator locator, PlaceConfig config) { _registry = registry; _invmgr = invmgr; _omgr = omgr; _locator = locator; _config = config; // initialize our...
java
public void init (PlaceRegistry registry, InvocationManager invmgr, RootDObjectManager omgr, BodyLocator locator, PlaceConfig config) { _registry = registry; _invmgr = invmgr; _omgr = omgr; _locator = locator; _config = config; // initialize our...
[ "public", "void", "init", "(", "PlaceRegistry", "registry", ",", "InvocationManager", "invmgr", ",", "RootDObjectManager", "omgr", ",", "BodyLocator", "locator", ",", "PlaceConfig", "config", ")", "{", "_registry", "=", "registry", ";", "_invmgr", "=", "invmgr", ...
Called by the place registry after creating this place manager.
[ "Called", "by", "the", "place", "registry", "after", "creating", "this", "place", "manager", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceManager.java#L188-L211
41,380
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceManager.java
PlaceManager.addDelegate
public void addDelegate (PlaceManagerDelegate delegate) { if (_delegates == null) { _delegates = Lists.newArrayList(); } if (_omgr != null) { delegate.init(this, _omgr, _invmgr); delegate.didInit(_config); } _delegates.add(delegate); }
java
public void addDelegate (PlaceManagerDelegate delegate) { if (_delegates == null) { _delegates = Lists.newArrayList(); } if (_omgr != null) { delegate.init(this, _omgr, _invmgr); delegate.didInit(_config); } _delegates.add(delegate); }
[ "public", "void", "addDelegate", "(", "PlaceManagerDelegate", "delegate", ")", "{", "if", "(", "_delegates", "==", "null", ")", "{", "_delegates", "=", "Lists", ".", "newArrayList", "(", ")", ";", "}", "if", "(", "_omgr", "!=", "null", ")", "{", "delegat...
Adds the supplied delegate to the list for this manager.
[ "Adds", "the", "supplied", "delegate", "to", "the", "list", "for", "this", "manager", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceManager.java#L216-L226
41,381
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceManager.java
PlaceManager.applyToDelegates
public void applyToDelegates (DelegateOp op) { if (_delegates != null) { for (int ii = 0, ll = _delegates.size(); ii < ll; ii++) { PlaceManagerDelegate delegate = _delegates.get(ii); if (op.shouldApply(delegate)) { op.apply(delegate); ...
java
public void applyToDelegates (DelegateOp op) { if (_delegates != null) { for (int ii = 0, ll = _delegates.size(); ii < ll; ii++) { PlaceManagerDelegate delegate = _delegates.get(ii); if (op.shouldApply(delegate)) { op.apply(delegate); ...
[ "public", "void", "applyToDelegates", "(", "DelegateOp", "op", ")", "{", "if", "(", "_delegates", "!=", "null", ")", "{", "for", "(", "int", "ii", "=", "0", ",", "ll", "=", "_delegates", ".", "size", "(", ")", ";", "ii", "<", "ll", ";", "ii", "++...
Applies the supplied operation to this manager's registered delegates.
[ "Applies", "the", "supplied", "operation", "to", "this", "manager", "s", "registered", "delegates", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceManager.java#L231-L241
41,382
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceManager.java
PlaceManager.startup
public void startup (PlaceObject plobj) { // keep track of this _plobj = plobj; // we usually want to create and register a speaker service instance that clients can use // to speak in this place if (shouldCreateSpeakService()) { plobj.setSpeakService(addProvider...
java
public void startup (PlaceObject plobj) { // keep track of this _plobj = plobj; // we usually want to create and register a speaker service instance that clients can use // to speak in this place if (shouldCreateSpeakService()) { plobj.setSpeakService(addProvider...
[ "public", "void", "startup", "(", "PlaceObject", "plobj", ")", "{", "// keep track of this", "_plobj", "=", "plobj", ";", "// we usually want to create and register a speaker service instance that clients can use", "// to speak in this place", "if", "(", "shouldCreateSpeakService",...
Called by the place manager after the place object has been successfully created.
[ "Called", "by", "the", "place", "manager", "after", "the", "place", "object", "has", "been", "successfully", "created", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceManager.java#L260-L289
41,383
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceManager.java
PlaceManager.registerMessageHandler
@Deprecated public void registerMessageHandler (String name, MessageHandler handler) { // create our handler map if necessary if (_msghandlers == null) { _msghandlers = Maps.newHashMap(); } _msghandlers.put(name, handler); }
java
@Deprecated public void registerMessageHandler (String name, MessageHandler handler) { // create our handler map if necessary if (_msghandlers == null) { _msghandlers = Maps.newHashMap(); } _msghandlers.put(name, handler); }
[ "@", "Deprecated", "public", "void", "registerMessageHandler", "(", "String", "name", ",", "MessageHandler", "handler", ")", "{", "// create our handler map if necessary", "if", "(", "_msghandlers", "==", "null", ")", "{", "_msghandlers", "=", "Maps", ".", "newHashM...
Registers a particular message handler instance to be used when processing message events with the specified name. @param name the message name of the message events that should be handled by this handler. @param handler the handler to be registered. @deprecated Use dynamically bound methods instead. See {@link Dynam...
[ "Registers", "a", "particular", "message", "handler", "instance", "to", "be", "used", "when", "processing", "message", "events", "with", "the", "specified", "name", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceManager.java#L361-L369
41,384
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceManager.java
PlaceManager.messageReceived
public void messageReceived (MessageEvent event) { if (_msghandlers != null) { MessageHandler handler = _msghandlers.get(event.getName()); if (handler != null) { handler.handleEvent(event, this); } } // If the message is directed at us, se...
java
public void messageReceived (MessageEvent event) { if (_msghandlers != null) { MessageHandler handler = _msghandlers.get(event.getName()); if (handler != null) { handler.handleEvent(event, this); } } // If the message is directed at us, se...
[ "public", "void", "messageReceived", "(", "MessageEvent", "event", ")", "{", "if", "(", "_msghandlers", "!=", "null", ")", "{", "MessageHandler", "handler", "=", "_msghandlers", ".", "get", "(", "event", ".", "getName", "(", ")", ")", ";", "if", "(", "ha...
from interface MessageListener
[ "from", "interface", "MessageListener" ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceManager.java#L372-L417
41,385
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceManager.java
PlaceManager.addProvider
protected <T extends InvocationMarshaller<?>> T addProvider ( InvocationProvider prov, Class<T> mclass) { T marsh = _invmgr.registerProvider(prov, mclass); _marshallers.add(marsh); return marsh; }
java
protected <T extends InvocationMarshaller<?>> T addProvider ( InvocationProvider prov, Class<T> mclass) { T marsh = _invmgr.registerProvider(prov, mclass); _marshallers.add(marsh); return marsh; }
[ "protected", "<", "T", "extends", "InvocationMarshaller", "<", "?", ">", ">", "T", "addProvider", "(", "InvocationProvider", "prov", ",", "Class", "<", "T", ">", "mclass", ")", "{", "T", "marsh", "=", "_invmgr", ".", "registerProvider", "(", "prov", ",", ...
Registers an invocation provider and notes the registration such that it will be automatically cleared when this manager shuts down.
[ "Registers", "an", "invocation", "provider", "and", "notes", "the", "registration", "such", "that", "it", "will", "be", "automatically", "cleared", "when", "this", "manager", "shuts", "down", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceManager.java#L588-L594
41,386
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceManager.java
PlaceManager.addDispatcher
protected <T extends InvocationMarshaller<?>> T addDispatcher (InvocationDispatcher<T> disp) { T marsh = _invmgr.registerDispatcher(disp); _marshallers.add(marsh); return marsh; }
java
protected <T extends InvocationMarshaller<?>> T addDispatcher (InvocationDispatcher<T> disp) { T marsh = _invmgr.registerDispatcher(disp); _marshallers.add(marsh); return marsh; }
[ "protected", "<", "T", "extends", "InvocationMarshaller", "<", "?", ">", ">", "T", "addDispatcher", "(", "InvocationDispatcher", "<", "T", ">", "disp", ")", "{", "T", "marsh", "=", "_invmgr", ".", "registerDispatcher", "(", "disp", ")", ";", "_marshallers", ...
Registers an invocation dispatcher and notes the registration such that it will be automatically cleared when this manager shuts down.
[ "Registers", "an", "invocation", "dispatcher", "and", "notes", "the", "registration", "such", "that", "it", "will", "be", "automatically", "cleared", "when", "this", "manager", "shuts", "down", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceManager.java#L600-L605
41,387
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceManager.java
PlaceManager.bodyEntered
protected void bodyEntered (final int bodyOid) { log.debug("Body entered", "where", where(), "oid", bodyOid); // let our delegates know what's up applyToDelegates(new DelegateOp(PlaceManagerDelegate.class) { @Override public void apply (PlaceManagerDelegate delegate)...
java
protected void bodyEntered (final int bodyOid) { log.debug("Body entered", "where", where(), "oid", bodyOid); // let our delegates know what's up applyToDelegates(new DelegateOp(PlaceManagerDelegate.class) { @Override public void apply (PlaceManagerDelegate delegate)...
[ "protected", "void", "bodyEntered", "(", "final", "int", "bodyOid", ")", "{", "log", ".", "debug", "(", "\"Body entered\"", ",", "\"where\"", ",", "where", "(", ")", ",", "\"oid\"", ",", "bodyOid", ")", ";", "// let our delegates know what's up", "applyToDelegat...
Called when a body object enters this place.
[ "Called", "when", "a", "body", "object", "enters", "this", "place", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceManager.java#L610-L624
41,388
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceManager.java
PlaceManager.bodyLeft
protected void bodyLeft (final int bodyOid) { log.debug("Body left", "where", where(), "oid", bodyOid); // if their occupant info hasn't been removed (which may be the case if they logged off // rather than left via a MoveTo request), we need to get it on out of here Integer key = I...
java
protected void bodyLeft (final int bodyOid) { log.debug("Body left", "where", where(), "oid", bodyOid); // if their occupant info hasn't been removed (which may be the case if they logged off // rather than left via a MoveTo request), we need to get it on out of here Integer key = I...
[ "protected", "void", "bodyLeft", "(", "final", "int", "bodyOid", ")", "{", "log", ".", "debug", "(", "\"Body left\"", ",", "\"where\"", ",", "where", "(", ")", ",", "\"oid\"", ",", "bodyOid", ")", ";", "// if their occupant info hasn't been removed (which may be t...
Called when a body object leaves this place.
[ "Called", "when", "a", "body", "object", "leaves", "this", "place", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceManager.java#L629-L654
41,389
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceManager.java
PlaceManager.bodyUpdated
protected void bodyUpdated (final OccupantInfo info) { // let our delegates know what's up applyToDelegates(new DelegateOp(PlaceManagerDelegate.class) { @Override public void apply (PlaceManagerDelegate delegate) { delegate.bodyUpdated(info); } ...
java
protected void bodyUpdated (final OccupantInfo info) { // let our delegates know what's up applyToDelegates(new DelegateOp(PlaceManagerDelegate.class) { @Override public void apply (PlaceManagerDelegate delegate) { delegate.bodyUpdated(info); } ...
[ "protected", "void", "bodyUpdated", "(", "final", "OccupantInfo", "info", ")", "{", "// let our delegates know what's up", "applyToDelegates", "(", "new", "DelegateOp", "(", "PlaceManagerDelegate", ".", "class", ")", "{", "@", "Override", "public", "void", "apply", ...
Called when a body's occupant info is updated.
[ "Called", "when", "a", "body", "s", "occupant", "info", "is", "updated", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceManager.java#L682-L691
41,390
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceManager.java
PlaceManager.placeBecameEmpty
protected void placeBecameEmpty () { // let our delegates know what's up applyToDelegates(new DelegateOp(PlaceManagerDelegate.class) { @Override public void apply (PlaceManagerDelegate delegate) { delegate.placeBecameEmpty(); } }); // ...
java
protected void placeBecameEmpty () { // let our delegates know what's up applyToDelegates(new DelegateOp(PlaceManagerDelegate.class) { @Override public void apply (PlaceManagerDelegate delegate) { delegate.placeBecameEmpty(); } }); // ...
[ "protected", "void", "placeBecameEmpty", "(", ")", "{", "// let our delegates know what's up", "applyToDelegates", "(", "new", "DelegateOp", "(", "PlaceManagerDelegate", ".", "class", ")", "{", "@", "Override", "public", "void", "apply", "(", "PlaceManagerDelegate", "...
Called when we transition from having bodies in the place to not having any bodies in the place. Some places may take this as a sign to pack it in, others may wish to stick around. In any case, they can override this method to do their thing.
[ "Called", "when", "we", "transition", "from", "having", "bodies", "in", "the", "place", "to", "not", "having", "any", "bodies", "in", "the", "place", ".", "Some", "places", "may", "take", "this", "as", "a", "sign", "to", "pack", "it", "in", "others", "...
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceManager.java#L698-L711
41,391
threerings/narya
core/src/main/java/com/threerings/crowd/server/PlaceManager.java
PlaceManager.checkShutdownInterval
protected void checkShutdownInterval () { // queue up a shutdown interval, unless we've already got one. long idlePeriod = idleUnloadPeriod(); if (idlePeriod > 0L && _shutdownInterval == null) { (_shutdownInterval = _omgr.newInterval(new Runnable() { public void r...
java
protected void checkShutdownInterval () { // queue up a shutdown interval, unless we've already got one. long idlePeriod = idleUnloadPeriod(); if (idlePeriod > 0L && _shutdownInterval == null) { (_shutdownInterval = _omgr.newInterval(new Runnable() { public void r...
[ "protected", "void", "checkShutdownInterval", "(", ")", "{", "// queue up a shutdown interval, unless we've already got one.", "long", "idlePeriod", "=", "idleUnloadPeriod", "(", ")", ";", "if", "(", "idlePeriod", ">", "0L", "&&", "_shutdownInterval", "==", "null", ")",...
Called on startup and when the place is empty.
[ "Called", "on", "startup", "and", "when", "the", "place", "is", "empty", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/server/PlaceManager.java#L716-L728
41,392
threerings/narya
core/src/main/java/com/threerings/crowd/chat/server/SpeakUtil.java
SpeakUtil.sendInfo
public static void sendInfo (DObject speakObj, String bundle, String message) { sendSystem(speakObj, bundle, message, SystemMessage.INFO); }
java
public static void sendInfo (DObject speakObj, String bundle, String message) { sendSystem(speakObj, bundle, message, SystemMessage.INFO); }
[ "public", "static", "void", "sendInfo", "(", "DObject", "speakObj", ",", "String", "bundle", ",", "String", "message", ")", "{", "sendSystem", "(", "speakObj", ",", "bundle", ",", "message", ",", "SystemMessage", ".", "INFO", ")", ";", "}" ]
Sends a system INFO message notification to the specified object with the supplied message content. A system message is one that will be rendered where the speak messages are rendered, but in a way that makes it clear that it is a message from the server. Info messages are sent when something happens that was neither ...
[ "Sends", "a", "system", "INFO", "message", "notification", "to", "the", "specified", "object", "with", "the", "supplied", "message", "content", ".", "A", "system", "message", "is", "one", "that", "will", "be", "rendered", "where", "the", "speak", "messages", ...
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/server/SpeakUtil.java#L125-L128
41,393
threerings/narya
core/src/main/java/com/threerings/crowd/chat/server/SpeakUtil.java
SpeakUtil.sendFeedback
public static void sendFeedback (DObject speakObj, String bundle, String message) { sendSystem(speakObj, bundle, message, SystemMessage.FEEDBACK); }
java
public static void sendFeedback (DObject speakObj, String bundle, String message) { sendSystem(speakObj, bundle, message, SystemMessage.FEEDBACK); }
[ "public", "static", "void", "sendFeedback", "(", "DObject", "speakObj", ",", "String", "bundle", ",", "String", "message", ")", "{", "sendSystem", "(", "speakObj", ",", "bundle", ",", "message", ",", "SystemMessage", ".", "FEEDBACK", ")", ";", "}" ]
Sends a system FEEDBACK message notification to the specified object with the supplied message content. A system message is one that will be rendered where the speak messages are rendered, but in a way that makes it clear that it is a message from the server. Feedback messages are sent in direct response to a user act...
[ "Sends", "a", "system", "FEEDBACK", "message", "notification", "to", "the", "specified", "object", "with", "the", "supplied", "message", "content", ".", "A", "system", "message", "is", "one", "that", "will", "be", "rendered", "where", "the", "speak", "messages...
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/server/SpeakUtil.java#L143-L146
41,394
threerings/narya
core/src/main/java/com/threerings/crowd/chat/server/SpeakUtil.java
SpeakUtil.sendAttention
public static void sendAttention (DObject speakObj, String bundle, String message) { sendSystem(speakObj, bundle, message, SystemMessage.ATTENTION); }
java
public static void sendAttention (DObject speakObj, String bundle, String message) { sendSystem(speakObj, bundle, message, SystemMessage.ATTENTION); }
[ "public", "static", "void", "sendAttention", "(", "DObject", "speakObj", ",", "String", "bundle", ",", "String", "message", ")", "{", "sendSystem", "(", "speakObj", ",", "bundle", ",", "message", ",", "SystemMessage", ".", "ATTENTION", ")", ";", "}" ]
Sends a system ATTENTION message notification to the specified object with the supplied message content. A system message is one that will be rendered where the speak messages are rendered, but in a way that makes it clear that it is a message from the server. Attention messages are sent when something requires user a...
[ "Sends", "a", "system", "ATTENTION", "message", "notification", "to", "the", "specified", "object", "with", "the", "supplied", "message", "content", ".", "A", "system", "message", "is", "one", "that", "will", "be", "rendered", "where", "the", "speak", "message...
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/server/SpeakUtil.java#L161-L164
41,395
threerings/narya
core/src/main/java/com/threerings/crowd/chat/server/SpeakUtil.java
SpeakUtil.sendMessage
public static void sendMessage (DObject speakObj, ChatMessage msg) { if (speakObj == null) { log.warning("Dropping speak message, no speak obj '" + msg + "'.", new Exception()); return; } // post the message to the relevant object speakObj.postMessage(ChatCod...
java
public static void sendMessage (DObject speakObj, ChatMessage msg) { if (speakObj == null) { log.warning("Dropping speak message, no speak obj '" + msg + "'.", new Exception()); return; } // post the message to the relevant object speakObj.postMessage(ChatCod...
[ "public", "static", "void", "sendMessage", "(", "DObject", "speakObj", ",", "ChatMessage", "msg", ")", "{", "if", "(", "speakObj", "==", "null", ")", "{", "log", ".", "warning", "(", "\"Dropping speak message, no speak obj '\"", "+", "msg", "+", "\"'.\"", ",",...
Send the specified message on the specified object.
[ "Send", "the", "specified", "message", "on", "the", "specified", "object", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/server/SpeakUtil.java#L169-L193
41,396
threerings/narya
core/src/main/java/com/threerings/crowd/chat/server/SpeakUtil.java
SpeakUtil.sendSystem
protected static void sendSystem (DObject speakObj, String bundle, String message, byte level) { sendMessage(speakObj, new SystemMessage(message, bundle, level)); }
java
protected static void sendSystem (DObject speakObj, String bundle, String message, byte level) { sendMessage(speakObj, new SystemMessage(message, bundle, level)); }
[ "protected", "static", "void", "sendSystem", "(", "DObject", "speakObj", ",", "String", "bundle", ",", "String", "message", ",", "byte", "level", ")", "{", "sendMessage", "(", "speakObj", ",", "new", "SystemMessage", "(", "message", ",", "bundle", ",", "leve...
Send the specified system message on the specified dobj.
[ "Send", "the", "specified", "system", "message", "on", "the", "specified", "dobj", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/server/SpeakUtil.java#L216-L219
41,397
davidmoten/grumpy
grumpy-ogc-layers/src/main/java/com/github/davidmoten/grumpy/wms/layer/darkness/SunUtil.java
SunUtil.getTwilight
public static Twilight getTwilight(double sunDistanceRadians) { double altDegrees = 90.0 - Math.toDegrees(sunDistanceRadians); if (altDegrees >= 0.0) { return Twilight.DAYLIGHT; } else if (altDegrees >= -6.0) { return Twilight.CIVIL; } else if (altDegrees >= -12.0) { return Twilight.NAUTICAL; } else...
java
public static Twilight getTwilight(double sunDistanceRadians) { double altDegrees = 90.0 - Math.toDegrees(sunDistanceRadians); if (altDegrees >= 0.0) { return Twilight.DAYLIGHT; } else if (altDegrees >= -6.0) { return Twilight.CIVIL; } else if (altDegrees >= -12.0) { return Twilight.NAUTICAL; } else...
[ "public", "static", "Twilight", "getTwilight", "(", "double", "sunDistanceRadians", ")", "{", "double", "altDegrees", "=", "90.0", "-", "Math", ".", "toDegrees", "(", "sunDistanceRadians", ")", ";", "if", "(", "altDegrees", ">=", "0.0", ")", "{", "return", "...
Return the twilight condition for a point which is a given great circle distance from the current sub solar point. @param sunDistanceRadians - from the current positon to the sub solar point @return The twilight condition
[ "Return", "the", "twilight", "condition", "for", "a", "point", "which", "is", "a", "given", "great", "circle", "distance", "from", "the", "current", "sub", "solar", "point", "." ]
f2d03e6b9771f15425fb3f76314837efc08c1233
https://github.com/davidmoten/grumpy/blob/f2d03e6b9771f15425fb3f76314837efc08c1233/grumpy-ogc-layers/src/main/java/com/github/davidmoten/grumpy/wms/layer/darkness/SunUtil.java#L42-L56
41,398
davidmoten/grumpy
grumpy-ogc-layers/src/main/java/com/github/davidmoten/grumpy/wms/layer/darkness/SunUtil.java
SunUtil.getSubSolarPoint
public static Position getSubSolarPoint(Calendar time) { // convert time to Julian Day Number double jd = TimeUtil.getJulianDayNumber(time); // Julian centuries since Jan 1, 2000, 12:00 UTC double T = (jd - 2451545.0) / 36525; // mean anomaly, degree double M = 357.52910 + 35999.05030 * T - 0.0001559 * ...
java
public static Position getSubSolarPoint(Calendar time) { // convert time to Julian Day Number double jd = TimeUtil.getJulianDayNumber(time); // Julian centuries since Jan 1, 2000, 12:00 UTC double T = (jd - 2451545.0) / 36525; // mean anomaly, degree double M = 357.52910 + 35999.05030 * T - 0.0001559 * ...
[ "public", "static", "Position", "getSubSolarPoint", "(", "Calendar", "time", ")", "{", "// convert time to Julian Day Number", "double", "jd", "=", "TimeUtil", ".", "getJulianDayNumber", "(", "time", ")", ";", "// Julian centuries since Jan 1, 2000, 12:00 UTC", "double", ...
Returns the position on the Earth's surface for which the sun appears to be straight above. @param time @return
[ "Returns", "the", "position", "on", "the", "Earth", "s", "surface", "for", "which", "the", "sun", "appears", "to", "be", "straight", "above", "." ]
f2d03e6b9771f15425fb3f76314837efc08c1233
https://github.com/davidmoten/grumpy/blob/f2d03e6b9771f15425fb3f76314837efc08c1233/grumpy-ogc-layers/src/main/java/com/github/davidmoten/grumpy/wms/layer/darkness/SunUtil.java#L82-L143
41,399
threerings/narya
core/src/main/java/com/threerings/presents/dobj/DynamicListener.java
DynamicListener.elementUpdated
public void elementUpdated (ElementUpdatedEvent event) { dispatchMethod(event.getName() + "Updated", new Object[] { event.getIndex(), event.getValue() }); }
java
public void elementUpdated (ElementUpdatedEvent event) { dispatchMethod(event.getName() + "Updated", new Object[] { event.getIndex(), event.getValue() }); }
[ "public", "void", "elementUpdated", "(", "ElementUpdatedEvent", "event", ")", "{", "dispatchMethod", "(", "event", ".", "getName", "(", ")", "+", "\"Updated\"", ",", "new", "Object", "[", "]", "{", "event", ".", "getIndex", "(", ")", ",", "event", ".", "...
from interface ElementUpdateListener
[ "from", "interface", "ElementUpdateListener" ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/dobj/DynamicListener.java#L68-L72