docstring_tokens
list
code_tokens
list
[ "the", "options", "for", "opening", "the", "file" ]
[ "return", "this", "options", ";" ]
[ "the", "options", "for", "opening", "the", "file" ]
[ "this", "options", "=", "options", ";", "return", "this", ";" ]
[ "the", "id", "of", "the", "current", "session" ]
[ "this", "session", "id", "=", "session", "id", ";", "set", "session", "id", "is", "set", "(", "true", ")", ";", "return", "this", ";" ]
[ "deprecated", "since", "1", "3", "0", "and", "will", "be", "removed", "in", "2", "0" ]
[ "return", "this", "metrics", ";" ]
[ "the", "client", "metrics", "deprecated", "since", "1", "3", "0", "and", "will", "be", "removed", "in", "2", "0" ]
[ "this", "metrics", "=", "metrics", ";", "return", "this", ";" ]
[ "the", "method", "options" ]
[ "return", "this", "options", ";" ]
[ "the", "method", "options" ]
[ "this", "options", "=", "options", ";", "return", "this", ";" ]
[ "returns", "true", "if", "field", "corresponding", "to", "field", "i", "d", "is", "set", "(", "has", "been", "assigned", "a", "value", ")", "and", "false", "otherwise" ]
[ "if", "(", "field", "=", "=", "null", ")", "{", "throw", "new", "illegal", "argument", "exception", "(", ")", ";", "}", "switch", "(", "field", ")", "{", "case", "session", "id", ":", "return", "is", "set", "session", "id", "(", ")", ";", "case", "metrics", ":", "return", "is", "set", "metrics", "(", ")", ";", "case", "options", ":", "return", "is", "set", "options", "(", ")", ";", "}", "throw", "new", "illegal", "state", "exception", "(", ")", ";" ]
[ "add", "a", "thread", "to", "the", "context", "for", "running", "threads", "can", "be", "of", "type", "{" ]
[ "test", "threads", "add", "(", "t", ")", ";" ]
[ "starts", "all", "test", "threads", "that", "have", "been", "added", "so", "far" ]
[ "for", "(", "testing", "thread", "t", ":", "test", "threads", ")", "{", "t", "start", "(", ")", ";", "}" ]
[ "waits", "for", "threads", "to", "finish", "or", "error", "out" ]
[ "long", "end", "time", "=", "time", "now", "(", ")", "+", "millis", ";", "while", "(", "should", "run", "(", ")", "&", "&", "finished", "threads", "size", "(", ")", "<", "test", "threads", "size", "(", ")", ")", "{", "long", "left", "=", "end", "time", "-", "time", "now", "(", ")", ";", "if", "(", "left", "<", "=", "0", ")", "break", ";", "check", "exception", "(", ")", ";", "wait", "(", "left", ")", ";", "}", "check", "exception", "(", ")", ";" ]
[ "called", "by", "{" ]
[ "finished", "threads", "add", "(", "t", ")", ";", "notify", "(", ")", ";" ]
[ "returns", "after", "stopping", "all", "threads", "by", "joining", "them", "back" ]
[ "synchronized", "(", "this", ")", "{", "stopped", "=", "true", ";", "}", "for", "(", "testing", "thread", "t", ":", "test", "threads", ")", "{", "t", "join", "(", ")", ";", "}", "check", "exception", "(", ")", ";" ]
[ "must", "be", "implemented", "is", "called", "when", "the", "work", "request", "is", "run" ]
[ "public", "abstract", "void", "do", "work", "(", ")", "throws", "exception", ";" ]
[ "repeats", "a", "given", "user", "action", "until", "the", "context", "is", "asked", "to", "stop", "or", "meets", "an", "error" ]
[ "while", "(", "ctx", "should", "run", "(", ")", "&", "&", "!", "stopped", ")", "{", "do", "an", "action", "(", ")", ";", "}" ]
[ "the", "maximum", "amount", "of", "time", "to", "wait", "in", "milliseconds", "on", "a", "synchronous", "read", "from", "the", "underlying", "input", "stream" ]
[ "maximum", "blocking", "time", "=", "maximum", "blocking", "time", ";", "return", "this", ";" ]
[ "the", "number", "of", "bytes", "to", "read", "from", "the", "input", "stream", "in", "order", "to", "fulfill", "write", "request" ]
[ "write", "chunk", "size", "=", "write", "chunk", "size", ";", "return", "this", ";" ]
[ "the", "maximum", "amount", "of", "time", "to", "wait", "in", "milliseconds", "that", "a", "request", "to", "abort", "has", "to", "wait", "for", "any", "outstanding", "read", "(", "and", "therefore", "write", ")", "operations", "to", "finish" ]
[ "abort", "timeout", "=", "abort", "timeout", ";", "return", "this", ";" ]
[ "build", "and", "return", "the", "multi", "part", "m", "i", "m", "e", "input", "stream" ]
[ "return", "new", "multi", "part", "m", "i", "m", "e", "input", "stream", "(", "input", "stream", ",", "executor", "service", ",", "headers", ",", "maximum", "blocking", "time", ",", "write", "chunk", "size", ",", "abort", "timeout", ")", ";" ]
[ "return", "a", "copy", "of", "the", "itemlist", "without", "items", "which", "have", "no", "media" ]
[ "array", "list", "<", "feed", "item", ">", "episodes", "=", "new", "array", "list", "<", ">", "(", "items", ")", ";", "for", "(", "feed", "item", "item", ":", "items", ")", "{", "if", "(", "item", "get", "media", "(", ")", "=", "=", "null", ")", "{", "episodes", "remove", "(", "item", ")", ";", "}", "}", "return", "episodes", ";" ]
[ "<", "p", ">", "the", "name", "of", "the", "address", "book", "<", "/", "p", ">" ]
[ "set", "name", "(", "name", ")", ";", "return", "this", ";" ]
[ "<", "p", ">", "the", "description", "of", "the", "address", "book", "<", "/", "p", ">" ]
[ "set", "description", "(", "description", ")", ";", "return", "this", ";" ]
[ "<", "p", ">", "a", "unique", "user", "-", "specified", "identifier", "for", "the", "request", "that", "ensures", "idempotency", "<", "/", "p", ">" ]
[ "set", "client", "request", "token", "(", "client", "request", "token", ")", ";", "return", "this", ";" ]
[ "a", "client", "token", "used", "to", "correlate", "requests", "and", "responses" ]
[ "set", "amzn", "client", "token", "(", "amzn", "client", "token", ")", ";", "return", "this", ";" ]
[ "information", "about", "the", "initial", "version", "of", "the", "device", "definition" ]
[ "this", "initial", "version", "=", "initial", "version", ";" ]
[ "information", "about", "the", "initial", "version", "of", "the", "device", "definition" ]
[ "return", "this", "initial", "version", ";" ]
[ "information", "about", "the", "initial", "version", "of", "the", "device", "definition" ]
[ "set", "initial", "version", "(", "initial", "version", ")", ";", "return", "this", ";" ]
[ "the", "name", "of", "the", "device", "definition" ]
[ "set", "name", "(", "name", ")", ";", "return", "this", ";" ]
[ "the", "first", "time", "a", "particular", "field", "name", "is", "passed", "simply", "return", "it", "the", "second", "time", "return", "it", "with", "2", "appended", "the", "third", "time", "return", "it", "with", "3", "appended", "etc" ]
[ "integer", "number", "seen", "=", "field", "name", "count", "store", "compute", "(", "field", "name", ",", "(", "k", ",", "v", ")", "-", ">", "1", "+", "(", "(", "v", "=", "=", "null", ")", "?", "0", ":", "v", ")", ")", ";", "if", "(", "number", "seen", ">", "1", ")", "{", "return", "field", "name", "+", "number", "seen", ";", "}", "else", "{", "return", "field", "name", ";", "}" ]
[ "auth" ]
[ "return", "enums", "convert", "(", "messenger", "get", "auth", "state", "(", ")", ")", ";" ]
[ "dialogs" ]
[ "if", "(", "callback", "=", "=", "null", ")", "{", "return", ";", "}", "messenger", "get", "shared", "dialog", "list", "(", ")", "subscribe", "(", "callback", ",", "false", ")", ";" ]
[ "contacts" ]
[ "if", "(", "callback", "=", "=", "null", ")", "{", "return", ";", "}", "messenger", "get", "shared", "contact", "list", "(", ")", "subscribe", "(", "callback", ",", "true", ")", ";" ]
[ "search" ]
[ "if", "(", "callback", "=", "=", "null", ")", "{", "return", ";", "}", "messenger", "get", "shared", "search", "list", "(", ")", "subscribe", "(", "callback", ",", "false", ")", ";" ]
[ "chats" ]
[ "messenger", "on", "conversation", "pre", "load", "(", "peer", "convert", "(", ")", ")", ";" ]
[ "peers" ]
[ "return", "js", "peer", "create", "(", "peer", "user", "(", "uid", ")", ")", ";" ]
[ "stickers" ]
[ "return", "messenger", "get", "stickers", "(", ")", "get", "(", ")", ";" ]
[ "users" ]
[ "return", "messenger", "get", "js", "user", "(", "uid", ")", "get", "(", ")", ";" ]
[ "groups" ]
[ "return", "messenger", "get", "js", "group", "(", "gid", ")", "get", "(", ")", ";" ]
[ "event", "bus" ]
[ "if", "(", "callback", "=", "=", "null", ")", "{", "return", ";", "}", "messenger", "subscribe", "event", "bus", "(", "callback", ")", ";" ]
[ "actions" ]
[ "messenger", "send", "message", "with", "mentions", "detect", "(", "peer", "convert", "(", ")", ",", "text", ")", ";" ]
[ "drafts" ]
[ "messenger", "save", "draft", "(", "peer", "convert", "(", ")", ",", "text", ")", ";" ]
[ "typing" ]
[ "messenger", "on", "typing", "(", "peer", "convert", "(", ")", ")", ";" ]
[ "updating", "state" ]
[ "messenger", "get", "online", "status", "(", ")", "subscribe", "(", "callback", ")", ";" ]
[ "}" ]
[ "string", "descriptor", "=", "provider", "register", "upload", "file", "(", "file", ")", ";", "messenger", "change", "my", "avatar", "(", "descriptor", ")", ";" ]
[ "settings" ]
[ "messenger", "change", "notifications", "enabled", "(", "peer", "convert", "(", ")", ",", "is", "enabled", ")", ";" ]
[ "converts", "the", "given", "{", "@", "code", "listenable", "future", "}", "to", "an", "equivalent", "{", "@", "code", "fluent", "future", "}" ]
[ "return", "future", "instanceof", "fluent", "future", "?", "(", "fluent", "future", "<", "v", ">", ")", "future", ":", "new", "forwarding", "fluent", "future", "<", "v", ">", "(", "future", ")", ";" ]
[ "returns", "a", "new", "{", "@", "code", "future", "}", "whose", "result", "is", "asynchronously", "derived", "from", "the", "result", "of", "this", "{", "@", "code", "future", "}", "if", "the", "input", "{", "@", "code", "future", "}", "fails", "the", "returned", "{", "@", "code", "future", "}", "fails", "with", "the", "same", "exception", "(", "and", "the", "function", "is", "not", "invoked", ")" ]
[ "return", "(", "fluent", "future", "<", "t", ">", ")", "futures", "transform", "async", "(", "this", ",", "function", ",", "executor", ")", ";" ]
[ "returns", "a", "new", "{", "@", "code", "future", "}", "whose", "result", "is", "derived", "from", "the", "result", "of", "this", "{", "@", "code", "future", "}", "if", "this", "input", "{", "@", "code", "future", "}", "fails", "the", "returned", "{", "@", "code", "future", "}", "fails", "with", "the", "same", "exception", "(", "and", "the", "function", "is", "not", "invoked", ")", "example", "usage", ":" ]
[ "return", "(", "fluent", "future", "<", "t", ">", ")", "futures", "transform", "(", "this", ",", "function", ",", "executor", ")", ";" ]
[ "registers", "separate", "success", "and", "failure", "callbacks", "to", "be", "run", "when", "this", "{", "@", "code", "future", "}", "s", "computation", "is", "{", "@", "linkplain", "java", "util", "concurrent", "future", "#", "is", "done", "(", ")", "complete", "}", "or", "if", "the", "computation", "is", "already", "complete", "immediately" ]
[ "futures", "add", "callback", "(", "this", ",", "callback", ",", "executor", ")", ";" ]
[ "returns", "the", "http", "method", "/", "verb", "for", "the", "request" ]
[ "return", "this", "method", ";" ]
[ "returns", "the", "response", "object", "allowing", "serializers", "to", "set", "headers" ]
[ "return", "this", "response", ";" ]
[ "returns", "the", "underlying", "netty", "{" ]
[ "return", "chan", ";" ]
[ "return", "the", "time", "in", "nanoseconds", "that", "this", "query", "object", "was", "created" ]
[ "return", "start", "time", ";" ]
[ "returns", "how", "many", "ms", "have", "elapsed", "since", "this", "query", "was", "created" ]
[ "return", "(", "int", ")", "(", "(", "system", "nano", "time", "(", ")", "-", "start", "time", ")", "/", "1000000", ")", ";" ]
[ "returns", "the", "value", "of", "the", "given", "query", "string", "parameter", "<", "p", ">", "if", "this", "parameter", "occurs", "multiple", "times", "in", "the", "url", "only", "the", "last", "value", "is", "returned", "and", "others", "are", "silently", "ignored" ]
[ "final", "list", "<", "string", ">", "params", "=", "get", "query", "string", "(", ")", "get", "(", "paramname", ")", ";", "return", "params", "=", "=", "null", "?", "null", ":", "params", "get", "(", "params", "size", "(", ")", "-", "1", ")", ";" ]
[ "returns", "the", "non", "-", "empty", "value", "of", "the", "given", "required", "query", "string", "parameter", "<", "p", ">", "if", "this", "parameter", "occurs", "multiple", "times", "in", "the", "url", "only", "the", "last", "value", "is", "returned", "and", "others", "are", "silently", "ignored" ]
[ "final", "string", "value", "=", "get", "query", "string", "param", "(", "paramname", ")", ";", "if", "(", "value", "=", "=", "null", "|", "|", "value", "is", "empty", "(", ")", ")", "{", "throw", "bad", "request", "exception", "missing", "parameter", "(", "paramname", ")", ";", "}", "return", "value", ";" ]
[ "returns", "whether", "or", "not", "the", "given", "query", "string", "parameter", "was", "passed" ]
[ "return", "get", "query", "string", "(", ")", "get", "(", "paramname", ")", "!", "=", "null", ";" ]
[ "returns", "all", "the", "values", "of", "the", "given", "query", "string", "parameter", "<", "p", ">", "in", "case", "this", "parameter", "occurs", "multiple", "times", "in", "the", "url", "this", "method", "is", "useful", "to", "get", "all", "the", "values" ]
[ "return", "get", "query", "string", "(", ")", "get", "(", "paramname", ")", ";" ]
[ "returns", "only", "the", "path", "component", "of", "the", "uri", "as", "a", "string", "this", "call", "strips", "the", "protocol", "host", "port", "and", "query", "string", "parameters", "leaving", "only", "the", "path", "e", "g", "/", "path", "/", "starts", "/", "here", "<", "p", ">", "note", "that", "for", "slightly", "quicker", "performance", "you", "can", "call", "request", "(", ")", "get", "uri", "(", ")", "to", "get", "the", "full", "path", "as", "a", "string", "but", "you", "ll", "have", "to", "strip", "query", "string", "parameters", "manually" ]
[ "return", "new", "query", "string", "decoder", "(", "request", "get", "uri", "(", ")", ")", "get", "path", "(", ")", ";" ]
[ "parses", "the", "query", "string", "to", "determine", "the", "base", "route", "for", "handing", "a", "query", "off", "to", "an", "rpc", "handler" ]
[ "public", "abstract", "string", "get", "query", "base", "route", "(", ")", ";" ]
[ "decodes", "the", "request", "content", "to", "a", "string", "using", "the", "appropriate", "character", "set" ]
[ "return", "this", "request", "get", "content", "(", ")", "to", "string", "(", "this", "get", "charset", "(", ")", ")", ";" ]
[ "send", "just", "the", "status", "code", "without", "a", "body", "used", "for", "204", "or", "304" ]
[ "if", "(", "!", "chan", "is", "connected", "(", ")", ")", "{", "if", "(", "stats", "!", "=", "null", ")", "{", "stats", "mark", "send", "failed", "(", ")", ";", "}", "done", "(", ")", ";", "return", ";", "}", "response", "set", "status", "(", "status", ")", ";", "final", "boolean", "keepalive", "=", "http", "headers", "is", "keep", "alive", "(", "request", ")", ";", "if", "(", "keepalive", ")", "{", "http", "headers", "set", "content", "length", "(", "response", ",", "0", ")", ";", "}", "final", "channel", "future", "future", "=", "chan", "write", "(", "response", ")", ";", "if", "(", "stats", "!", "=", "null", ")", "{", "future", "add", "listener", "(", "new", "send", "success", "(", ")", ")", ";", "}", "if", "(", "!", "keepalive", ")", "{", "future", "add", "listener", "(", "channel", "future", "listener", "close", ")", ";", "}", "done", "(", ")", ";" ]
[ "logger", "for", "the", "query", "instance" ]
[ "return", "log", ";" ]
[ "converts", "a", "thrift", "type", "to", "a", "wire", "type" ]
[ "return", "new", "config", "property", "(", "config", "property", ")", ";" ]
[ "{" ]
[ "return", "!", "(", "obj", "=", "=", "null", "|", "|", "!", "obj", "get", "class", "(", ")", "equals", "(", "get", "class", "(", ")", ")", ")", "&", "&", "(", "(", "grid", "checkpoint", "test", "state", ")", "obj", ")", "data", "equals", "(", "data", ")", ";" ]
[ "initializes", "the", "global", "comment", "for", "an", "edge" ]
[ "final", "i", "navi", "view", "node", "source", "=", "edge", "get", "source", "(", ")", ";", "final", "i", "navi", "view", "node", "target", "=", "edge", "get", "target", "(", ")", ";", "if", "(", "(", "source", "instanceof", "i", "navi", "code", "node", ")", "&", "&", "(", "target", "instanceof", "i", "address", "node", ")", ")", "{", "comment", "manager", "get", "(", "provider", ")", "initialize", "global", "edge", "comment", "(", "edge", ",", "global", "comments", ")", ";", "}", "else", "if", "(", "(", "source", "instanceof", "i", "navi", "function", "node", ")", "&", "&", "(", "target", "instanceof", "i", "address", "node", ")", ")", "{", "comment", "manager", "get", "(", "provider", ")", "initialize", "global", "edge", "comment", "(", "edge", ",", "global", "comments", ")", ";", "}" ]
[ "loads", "the", "edges", "of", "a", "view" ]
[ "final", "map", "<", "integer", ",", "i", "navi", "view", "node", ">", "node", "lookup", "=", "new", "hash", "map", "<", "integer", ",", "i", "navi", "view", "node", ">", "(", ")", ";", "final", "list", "<", "integer", ">", "node", "id", "list", "=", "new", "array", "list", "<", "integer", ">", "(", ")", ";", "for", "(", "final", "i", "navi", "view", "node", "view", "node", ":", "nodes", ")", "{", "node", "lookup", "put", "(", "view", "node", "get", "id", "(", ")", ",", "view", "node", ")", ";", "node", "id", "list", "add", "(", "view", "node", "get", "id", "(", ")", ")", ";", "}", "final", "map", "<", "integer", ",", "array", "list", "<", "i", "comment", ">", ">", "edge", "to", "global", "comment", "map", "=", "load", "global", "edge", "comments", "(", "provider", ",", "view", "get", "configuration", "(", ")", "get", "id", "(", ")", ")", ";", "return", "load", "edges", "(", "provider", ",", "view", ",", "node", "lookup", ",", "edge", "to", "global", "comment", "map", ")", ";" ]
[ "<", "p", ">", "[", "required", "]", "the", "string", "identifier", "of", "the", "associated", "<", "a", ">", "rest", "api", "<", "/", "a", ">", "<", "/", "p", ">" ]
[ "set", "rest", "api", "id", "(", "rest", "api", "id", ")", ";", "return", "this", ";" ]
[ "<", "p", ">", "[", "required", "]", "<", "p", ">", "the", "response", "type", "of", "the", "associated", "<", "a", ">", "gateway", "response", "<", "/", "a", ">", "valid", "values", "are", "<", "ul", ">", "<", "li", ">", "access", "denied", "<", "/", "li", ">", "<", "li", ">", "api", "configuration", "error", "<", "/", "li", ">", "<", "li", ">", "authorizer", "failure", "<", "/", "li", ">", "<", "li", ">", "authorizer", "configuration", "error", "<", "/", "li", ">", "<", "li", ">", "bad", "request", "parameters", "<", "/", "li", ">", "<", "li", ">", "bad", "request", "body", "<", "/", "li", ">", "<", "li", ">", "default", "4xx", "<", "/", "li", ">", "<", "li", ">", "default", "5xx", "<", "/", "li", ">", "<", "li", ">", "expired", "token", "<", "/", "li", ">", "<", "li", ">", "invalid", "signature", "<", "/", "li", ">", "<", "li", ">", "integration", "failure", "<", "/", "li", ">", "<", "li", ">", "integration", "timeout", "<", "/", "li", ">", "<", "li", ">", "invalid", "api", "key", "<", "/", "li", ">", "<", "li", ">", "missing", "authentication", "token", "<", "/", "li", ">", "<", "li", ">", "quota", "exceeded", "<", "/", "li", ">", "<", "li", ">", "request", "too", "large", "<", "/", "li", ">", "<", "li", ">", "resource", "not", "found", "<", "/", "li", ">", "<", "li", ">", "throttled", "<", "/", "li", ">", "<", "li", ">", "unauthorized", "<", "/", "li", ">", "<", "li", ">", "unsupported", "media", "type", "<", "/", "li", ">", "<", "/", "ul", ">", "<", "/", "p", ">", "<", "/", "p", ">" ]
[ "set", "response", "type", "(", "response", "type", ")", ";", "return", "this", ";" ]
[ "<", "p", ">", "[", "required", "]", "<", "p", ">", "the", "response", "type", "of", "the", "associated", "<", "a", ">", "gateway", "response", "<", "/", "a", ">", "valid", "values", "are", "<", "ul", ">", "<", "li", ">", "access", "denied", "<", "/", "li", ">", "<", "li", ">", "api", "configuration", "error", "<", "/", "li", ">", "<", "li", ">", "authorizer", "failure", "<", "/", "li", ">", "<", "li", ">", "authorizer", "configuration", "error", "<", "/", "li", ">", "<", "li", ">", "bad", "request", "parameters", "<", "/", "li", ">", "<", "li", ">", "bad", "request", "body", "<", "/", "li", ">", "<", "li", ">", "default", "4xx", "<", "/", "li", ">", "<", "li", ">", "default", "5xx", "<", "/", "li", ">", "<", "li", ">", "expired", "token", "<", "/", "li", ">", "<", "li", ">", "invalid", "signature", "<", "/", "li", ">", "<", "li", ">", "integration", "failure", "<", "/", "li", ">", "<", "li", ">", "integration", "timeout", "<", "/", "li", ">", "<", "li", ">", "invalid", "api", "key", "<", "/", "li", ">", "<", "li", ">", "missing", "authentication", "token", "<", "/", "li", ">", "<", "li", ">", "quota", "exceeded", "<", "/", "li", ">", "<", "li", ">", "request", "too", "large", "<", "/", "li", ">", "<", "li", ">", "resource", "not", "found", "<", "/", "li", ">", "<", "li", ">", "throttled", "<", "/", "li", ">", "<", "li", ">", "unauthorized", "<", "/", "li", ">", "<", "li", ">", "unsupported", "media", "type", "<", "/", "li", ">", "<", "/", "ul", ">", "<", "/", "p", ">", "<", "/", "p", ">" ]
[ "this", "response", "type", "=", "response", "type", "to", "string", "(", ")", ";", "return", "this", ";" ]
[ "the", "http", "status", "code", "of", "the", "<", "a", ">", "gateway", "response", "<", "/", "a", ">" ]
[ "set", "status", "code", "(", "status", "code", ")", ";", "return", "this", ";" ]
[ "<", "p", ">", "<", "p", ">", "response", "parameters", "(", "paths", "query", "strings", "and", "headers", ")", "of", "the", "<", "a", ">", "gateway", "response", "<", "/", "a", ">", "as", "a", "string", "-", "to", "-", "string", "map", "of", "key", "-", "value", "pairs", "<", "/", "p", ">", "<", "/", "p", ">" ]
[ "set", "response", "parameters", "(", "response", "parameters", ")", ";", "return", "this", ";" ]
[ "removes", "all", "the", "entries", "added", "into", "response", "parameters" ]
[ "this", "response", "parameters", "=", "null", ";", "return", "this", ";" ]
[ "<", "p", ">", "<", "p", ">", "response", "templates", "of", "the", "<", "a", ">", "gateway", "response", "<", "/", "a", ">", "as", "a", "string", "-", "to", "-", "string", "map", "of", "key", "-", "value", "pairs", "<", "/", "p", ">", "<", "/", "p", ">" ]
[ "set", "response", "templates", "(", "response", "templates", ")", ";", "return", "this", ";" ]
[ "removes", "all", "the", "entries", "added", "into", "response", "templates" ]
[ "this", "response", "templates", "=", "null", ";", "return", "this", ";" ]
[ "{" ]
[ "return", "rebuild", "(", "new", "o", "index", "rebuild", "output", "listener", "(", "this", ")", ")", ";" ]
[ "{" ]
[ "return", "0", ";" ]
[ "interprets", "transaction", "index", "changes", "for", "a", "certain", "key", "override", "it", "to", "customize", "index", "behaviour", "on", "interpreting", "index", "changes", "this", "may", "be", "viewed", "as", "an", "optimization", "but", "in", "some", "cases", "this", "is", "a", "requirement", "for", "example", "if", "you", "put", "multiple", "values", "under", "the", "same", "key", "during", "the", "transaction", "for", "single", "-", "valued", "/", "unique", "index", "but", "remove", "all", "of", "them", "except", "one", "before", "commit", "there", "is", "no", "point", "in", "throwing", "{", "@", "link", "com", "orientechnologies", "orient", "core", "storage", "o", "record", "duplicated", "exception", "}", "while", "applying", "index", "changes" ]
[ "return", "changes", "entries", ";" ]
[ "{" ]
[ "return", "rebuilding", ";" ]
[ "function", "to", "find", "the", "clients", "entity", "reference", "and", "return", "it" ]
[ "for", "(", "entity", "ref", "entity", "ref", ":", "entity", "manager", "get", "entities", "with", "(", "client", "info", "component", "class", ")", ")", "{", "client", "info", "component", "client", "info", "component", "=", "entity", "ref", "get", "component", "(", "client", "info", "component", "class", ")", ";", "if", "(", "client", "info", "component", "player", "id", "equals", "(", "get", "id", "(", ")", ")", ")", "{", "return", "entity", "ref", ";", "}", "}", "return", "entity", "ref", "null", ";" ]
[ "used", "to", "change", "or", "add", "a", "color", "to", "the", "client", "entity" ]
[ "color", "component", "color", "comp", "=", "client", "info", "get", "component", "(", "color", "component", "class", ")", ";", "if", "(", "color", "comp", "!", "=", "null", ")", "{", "color", "comp", "color", "=", "color", ";", "client", "info", "save", "component", "(", "color", "comp", ")", ";", "}", "else", "{", "color", "comp", "=", "new", "color", "component", "(", ")", ";", "color", "comp", "color", "=", "color", ";", "client", "info", "add", "component", "(", "color", "comp", ")", ";", "}" ]
[ "used", "to", "change", "or", "add", "a", "display", "name", "to", "the", "client", "entity" ]
[ "display", "name", "component", "component", "=", "client", "info", "get", "component", "(", "display", "name", "component", "class", ")", ";", "if", "(", "component", "!", "=", "null", ")", "{", "component", "name", "=", "name", ";", "client", "info", "save", "component", "(", "component", ")", ";", "}", "else", "{", "component", "=", "new", "display", "name", "component", "(", ")", ";", "component", "name", "=", "name", ";", "client", "info", "add", "component", "(", "component", ")", ";", "}" ]
[ "provides", "an", "alternative", "name", "to", "the", "client", "when", "the", "preferred", "name", "is", "taken", "or", "unavailable", "appending", "a", "suffix", "to", "the", "end" ]
[ "set", "<", "string", ">", "used", "names", "=", "find", "names", "of", "other", "players", "(", "entity", "manager", ",", "player", ")", ";", "string", "name", "=", "preferred", "name", ";", "int", "next", "suffix", "=", "2", ";", "while", "(", "used", "names", "contains", "(", "name", ")", ")", "{", "name", "=", "preferred", "name", "+", "next", "suffix", ";", "next", "suffix", "+", "+", ";", "}", "return", "name", ";" ]
[ "creates", "a", "hash", "set", "<", "string", ">", "of", "all", "connected", "player", "names" ]
[ "set", "<", "string", ">", "other", "names", "=", "new", "hash", "set", "<", ">", "(", ")", ";", "for", "(", "entity", "ref", "client", "info", ":", "entity", "manager", "get", "entities", "with", "(", "client", "info", "component", "class", ")", ")", "{", "if", "(", "!", "client", "info", "equals", "(", "player", ")", ")", "{", "display", "name", "component", "display", "info", "=", "client", "info", "get", "component", "(", "display", "name", "component", "class", ")", ";", "string", "used", "name", "=", "display", "info", "name", ";", "other", "names", "add", "(", "used", "name", ")", ";", "}", "}", "return", "other", "names", ";" ]
[ "return", "current", "cell", "has", "virtual", "component" ]
[ "return", "virtual", "component", "ids", "!", "=", "null", "&", "&", "virtual", "component", "ids", "size", "(", ")", ">", "0", ";" ]
[ "<", "p", ">", "the", "id", "of", "the", "namespace", "to", "use", "for", "dns", "configuration", "<", "/", "p", ">" ]
[ "this", "namespace", "id", "=", "namespace", "id", ";" ]
[ "<", "p", ">", "the", "id", "of", "the", "namespace", "to", "use", "for", "dns", "configuration", "<", "/", "p", ">" ]
[ "return", "this", "namespace", "id", ";" ]
[ "<", "p", ">", "the", "id", "of", "the", "namespace", "to", "use", "for", "dns", "configuration", "<", "/", "p", ">" ]
[ "set", "namespace", "id", "(", "namespace", "id", ")", ";", "return", "this", ";" ]
[ "<", "p", ">", "the", "routing", "policy", "that", "you", "want", "to", "apply", "to", "all", "records", "that", "route", "53", "creates", "when", "you", "register", "an", "instance", "and", "specify", "this", "service", "<", "/", "p", ">", "<", "note", ">", "<", "p", ">", "if", "you", "want", "to", "use", "this", "service", "to", "register", "instances", "that", "create", "alias", "records", "specify", "<", "code", ">", "weighted", "<", "/", "code", ">", "for", "the", "routing", "policy", "<", "/", "p", ">", "<", "/", "note", ">", "<", "p", ">", "you", "can", "specify", "the", "following", "values", ":", "<", "/", "p", ">", "<", "p", ">", "<", "b", ">", "multivalue", "<", "/", "b", ">", "<", "/", "p", ">", "<", "p", ">", "if", "you", "define", "a", "health", "check", "for", "the", "service", "and", "the", "health", "check", "is", "healthy", "route", "53", "returns", "the", "applicable", "value", "for", "up", "to", "eight", "instances", "<", "/", "p", ">", "<", "p", ">", "for", "example", "suppose", "the", "service", "includes", "configurations", "for", "one", "a", "record", "and", "a", "health", "check", "and", "you", "use", "the", "service", "to", "register", "10", "instances", "route", "53", "responds", "to", "dns", "queries", "with", "ip", "addresses", "for", "up", "to", "eight", "healthy", "instances", "if", "fewer", "than", "eight", "instances", "are", "healthy", "route", "53", "responds", "to", "every", "dns", "query", "with", "the", "ip", "addresses", "for", "all", "of", "the", "healthy", "instances", "<", "/", "p", ">", "<", "p", ">", "if", "you", "don", "t", "define", "a", "health", "check", "for", "the", "service", "route", "53", "assumes", "that", "all", "instances", "are", "healthy", "and", "returns", "the", "values", "for", "up", "to", "eight", "instances", "<", "/", "p", ">", "<", "p", ">", "for", "more", "information", "about", "the", "multivalue", "routing", "policy", "see", "<", "a", "href", "=", "http", ":", "/", "/", "docs", "aws", "amazon", "com", "/", "route", "5", "3", "/", "latest", "/", "developer", "guide", "/", "routing", "-", "policy", "html", "#", "routing", "-", "policy", "-", "multivalue", ">", "multivalue", "answer", "routing", "<", "/", "a", ">", "in", "the", "<", "i", ">", "route", "53", "developer", "guide", "<", "/", "i", ">", "<", "/", "p", ">", "<", "p", ">", "<", "b", ">", "weighted", "<", "/", "b", ">", "<", "/", "p", ">", "<", "p", ">", "route", "53", "returns", "the", "applicable", "value", "from", "one", "randomly", "selected", "instance", "from", "among", "the", "instances", "that", "you", "registered", "using", "the", "same", "service", "currently", "all", "records", "have", "the", "same", "weight", "so", "you", "can", "t", "route", "more", "or", "less", "traffic", "to", "any", "instances", "<", "/", "p", ">", "<", "p", ">", "for", "example", "suppose", "the", "service", "includes", "configurations", "for", "one", "a", "record", "and", "a", "health", "check", "and", "you", "use", "the", "service", "to", "register", "10", "instances", "route", "53", "responds", "to", "dns", "queries", "with", "the", "ip", "address", "for", "one", "randomly", "selected", "instance", "from", "among", "the", "healthy", "instances", "if", "no", "instances", "are", "healthy", "route", "53", "responds", "to", "dns", "queries", "as", "if", "all", "of", "the", "instances", "were", "healthy", "<", "/", "p", ">", "<", "p", ">", "if", "you", "don", "t", "define", "a", "health", "check", "for", "the", "service", "route", "53", "assumes", "that", "all", "instances", "are", "healthy", "and", "returns", "the", "applicable", "value", "for", "one", "randomly", "selected", "instance", "<", "/", "p", ">", "<", "p", ">", "for", "more", "information", "about", "the", "weighted", "routing", "policy", "see", "<", "a", "href", "=", "http", ":", "/", "/", "docs", "aws", "amazon", "com", "/", "route", "5", "3", "/", "latest", "/", "developer", "guide", "/", "routing", "-", "policy", "html", "#", "routing", "-", "policy", "-", "weighted", ">", "weighted", "routing", "<", "/", "a", ">", "in", "the", "<", "i", ">", "route", "53", "developer", "guide", "<", "/", "i", ">", "<", "/", "p", ">" ]
[ "this", "routing", "policy", "=", "routing", "policy", ";" ]
[ "<", "p", ">", "the", "routing", "policy", "that", "you", "want", "to", "apply", "to", "all", "records", "that", "route", "53", "creates", "when", "you", "register", "an", "instance", "and", "specify", "this", "service", "<", "/", "p", ">", "<", "note", ">", "<", "p", ">", "if", "you", "want", "to", "use", "this", "service", "to", "register", "instances", "that", "create", "alias", "records", "specify", "<", "code", ">", "weighted", "<", "/", "code", ">", "for", "the", "routing", "policy", "<", "/", "p", ">", "<", "/", "note", ">", "<", "p", ">", "you", "can", "specify", "the", "following", "values", ":", "<", "/", "p", ">", "<", "p", ">", "<", "b", ">", "multivalue", "<", "/", "b", ">", "<", "/", "p", ">", "<", "p", ">", "if", "you", "define", "a", "health", "check", "for", "the", "service", "and", "the", "health", "check", "is", "healthy", "route", "53", "returns", "the", "applicable", "value", "for", "up", "to", "eight", "instances", "<", "/", "p", ">", "<", "p", ">", "for", "example", "suppose", "the", "service", "includes", "configurations", "for", "one", "a", "record", "and", "a", "health", "check", "and", "you", "use", "the", "service", "to", "register", "10", "instances", "route", "53", "responds", "to", "dns", "queries", "with", "ip", "addresses", "for", "up", "to", "eight", "healthy", "instances", "if", "fewer", "than", "eight", "instances", "are", "healthy", "route", "53", "responds", "to", "every", "dns", "query", "with", "the", "ip", "addresses", "for", "all", "of", "the", "healthy", "instances", "<", "/", "p", ">", "<", "p", ">", "if", "you", "don", "t", "define", "a", "health", "check", "for", "the", "service", "route", "53", "assumes", "that", "all", "instances", "are", "healthy", "and", "returns", "the", "values", "for", "up", "to", "eight", "instances", "<", "/", "p", ">", "<", "p", ">", "for", "more", "information", "about", "the", "multivalue", "routing", "policy", "see", "<", "a", "href", "=", "http", ":", "/", "/", "docs", "aws", "amazon", "com", "/", "route", "5", "3", "/", "latest", "/", "developer", "guide", "/", "routing", "-", "policy", "html", "#", "routing", "-", "policy", "-", "multivalue", ">", "multivalue", "answer", "routing", "<", "/", "a", ">", "in", "the", "<", "i", ">", "route", "53", "developer", "guide", "<", "/", "i", ">", "<", "/", "p", ">", "<", "p", ">", "<", "b", ">", "weighted", "<", "/", "b", ">", "<", "/", "p", ">", "<", "p", ">", "route", "53", "returns", "the", "applicable", "value", "from", "one", "randomly", "selected", "instance", "from", "among", "the", "instances", "that", "you", "registered", "using", "the", "same", "service", "currently", "all", "records", "have", "the", "same", "weight", "so", "you", "can", "t", "route", "more", "or", "less", "traffic", "to", "any", "instances", "<", "/", "p", ">", "<", "p", ">", "for", "example", "suppose", "the", "service", "includes", "configurations", "for", "one", "a", "record", "and", "a", "health", "check", "and", "you", "use", "the", "service", "to", "register", "10", "instances", "route", "53", "responds", "to", "dns", "queries", "with", "the", "ip", "address", "for", "one", "randomly", "selected", "instance", "from", "among", "the", "healthy", "instances", "if", "no", "instances", "are", "healthy", "route", "53", "responds", "to", "dns", "queries", "as", "if", "all", "of", "the", "instances", "were", "healthy", "<", "/", "p", ">", "<", "p", ">", "if", "you", "don", "t", "define", "a", "health", "check", "for", "the", "service", "route", "53", "assumes", "that", "all", "instances", "are", "healthy", "and", "returns", "the", "applicable", "value", "for", "one", "randomly", "selected", "instance", "<", "/", "p", ">", "<", "p", ">", "for", "more", "information", "about", "the", "weighted", "routing", "policy", "see", "<", "a", "href", "=", "http", ":", "/", "/", "docs", "aws", "amazon", "com", "/", "route", "5", "3", "/", "latest", "/", "developer", "guide", "/", "routing", "-", "policy", "html", "#", "routing", "-", "policy", "-", "weighted", ">", "weighted", "routing", "<", "/", "a", ">", "in", "the", "<", "i", ">", "route", "53", "developer", "guide", "<", "/", "i", ">", "<", "/", "p", ">" ]
[ "return", "this", "routing", "policy", ";" ]
[ "<", "p", ">", "the", "routing", "policy", "that", "you", "want", "to", "apply", "to", "all", "records", "that", "route", "53", "creates", "when", "you", "register", "an", "instance", "and", "specify", "this", "service", "<", "/", "p", ">", "<", "note", ">", "<", "p", ">", "if", "you", "want", "to", "use", "this", "service", "to", "register", "instances", "that", "create", "alias", "records", "specify", "<", "code", ">", "weighted", "<", "/", "code", ">", "for", "the", "routing", "policy", "<", "/", "p", ">", "<", "/", "note", ">", "<", "p", ">", "you", "can", "specify", "the", "following", "values", ":", "<", "/", "p", ">", "<", "p", ">", "<", "b", ">", "multivalue", "<", "/", "b", ">", "<", "/", "p", ">", "<", "p", ">", "if", "you", "define", "a", "health", "check", "for", "the", "service", "and", "the", "health", "check", "is", "healthy", "route", "53", "returns", "the", "applicable", "value", "for", "up", "to", "eight", "instances", "<", "/", "p", ">", "<", "p", ">", "for", "example", "suppose", "the", "service", "includes", "configurations", "for", "one", "a", "record", "and", "a", "health", "check", "and", "you", "use", "the", "service", "to", "register", "10", "instances", "route", "53", "responds", "to", "dns", "queries", "with", "ip", "addresses", "for", "up", "to", "eight", "healthy", "instances", "if", "fewer", "than", "eight", "instances", "are", "healthy", "route", "53", "responds", "to", "every", "dns", "query", "with", "the", "ip", "addresses", "for", "all", "of", "the", "healthy", "instances", "<", "/", "p", ">", "<", "p", ">", "if", "you", "don", "t", "define", "a", "health", "check", "for", "the", "service", "route", "53", "assumes", "that", "all", "instances", "are", "healthy", "and", "returns", "the", "values", "for", "up", "to", "eight", "instances", "<", "/", "p", ">", "<", "p", ">", "for", "more", "information", "about", "the", "multivalue", "routing", "policy", "see", "<", "a", "href", "=", "http", ":", "/", "/", "docs", "aws", "amazon", "com", "/", "route", "5", "3", "/", "latest", "/", "developer", "guide", "/", "routing", "-", "policy", "html", "#", "routing", "-", "policy", "-", "multivalue", ">", "multivalue", "answer", "routing", "<", "/", "a", ">", "in", "the", "<", "i", ">", "route", "53", "developer", "guide", "<", "/", "i", ">", "<", "/", "p", ">", "<", "p", ">", "<", "b", ">", "weighted", "<", "/", "b", ">", "<", "/", "p", ">", "<", "p", ">", "route", "53", "returns", "the", "applicable", "value", "from", "one", "randomly", "selected", "instance", "from", "among", "the", "instances", "that", "you", "registered", "using", "the", "same", "service", "currently", "all", "records", "have", "the", "same", "weight", "so", "you", "can", "t", "route", "more", "or", "less", "traffic", "to", "any", "instances", "<", "/", "p", ">", "<", "p", ">", "for", "example", "suppose", "the", "service", "includes", "configurations", "for", "one", "a", "record", "and", "a", "health", "check", "and", "you", "use", "the", "service", "to", "register", "10", "instances", "route", "53", "responds", "to", "dns", "queries", "with", "the", "ip", "address", "for", "one", "randomly", "selected", "instance", "from", "among", "the", "healthy", "instances", "if", "no", "instances", "are", "healthy", "route", "53", "responds", "to", "dns", "queries", "as", "if", "all", "of", "the", "instances", "were", "healthy", "<", "/", "p", ">", "<", "p", ">", "if", "you", "don", "t", "define", "a", "health", "check", "for", "the", "service", "route", "53", "assumes", "that", "all", "instances", "are", "healthy", "and", "returns", "the", "applicable", "value", "for", "one", "randomly", "selected", "instance", "<", "/", "p", ">", "<", "p", ">", "for", "more", "information", "about", "the", "weighted", "routing", "policy", "see", "<", "a", "href", "=", "http", ":", "/", "/", "docs", "aws", "amazon", "com", "/", "route", "5", "3", "/", "latest", "/", "developer", "guide", "/", "routing", "-", "policy", "html", "#", "routing", "-", "policy", "-", "weighted", ">", "weighted", "routing", "<", "/", "a", ">", "in", "the", "<", "i", ">", "route", "53", "developer", "guide", "<", "/", "i", ">", "<", "/", "p", ">" ]
[ "set", "routing", "policy", "(", "routing", "policy", ")", ";", "return", "this", ";" ]
[ "<", "p", ">", "the", "routing", "policy", "that", "you", "want", "to", "apply", "to", "all", "records", "that", "route", "53", "creates", "when", "you", "register", "an", "instance", "and", "specify", "this", "service", "<", "/", "p", ">", "<", "note", ">", "<", "p", ">", "if", "you", "want", "to", "use", "this", "service", "to", "register", "instances", "that", "create", "alias", "records", "specify", "<", "code", ">", "weighted", "<", "/", "code", ">", "for", "the", "routing", "policy", "<", "/", "p", ">", "<", "/", "note", ">", "<", "p", ">", "you", "can", "specify", "the", "following", "values", ":", "<", "/", "p", ">", "<", "p", ">", "<", "b", ">", "multivalue", "<", "/", "b", ">", "<", "/", "p", ">", "<", "p", ">", "if", "you", "define", "a", "health", "check", "for", "the", "service", "and", "the", "health", "check", "is", "healthy", "route", "53", "returns", "the", "applicable", "value", "for", "up", "to", "eight", "instances", "<", "/", "p", ">", "<", "p", ">", "for", "example", "suppose", "the", "service", "includes", "configurations", "for", "one", "a", "record", "and", "a", "health", "check", "and", "you", "use", "the", "service", "to", "register", "10", "instances", "route", "53", "responds", "to", "dns", "queries", "with", "ip", "addresses", "for", "up", "to", "eight", "healthy", "instances", "if", "fewer", "than", "eight", "instances", "are", "healthy", "route", "53", "responds", "to", "every", "dns", "query", "with", "the", "ip", "addresses", "for", "all", "of", "the", "healthy", "instances", "<", "/", "p", ">", "<", "p", ">", "if", "you", "don", "t", "define", "a", "health", "check", "for", "the", "service", "route", "53", "assumes", "that", "all", "instances", "are", "healthy", "and", "returns", "the", "values", "for", "up", "to", "eight", "instances", "<", "/", "p", ">", "<", "p", ">", "for", "more", "information", "about", "the", "multivalue", "routing", "policy", "see", "<", "a", "href", "=", "http", ":", "/", "/", "docs", "aws", "amazon", "com", "/", "route", "5", "3", "/", "latest", "/", "developer", "guide", "/", "routing", "-", "policy", "html", "#", "routing", "-", "policy", "-", "multivalue", ">", "multivalue", "answer", "routing", "<", "/", "a", ">", "in", "the", "<", "i", ">", "route", "53", "developer", "guide", "<", "/", "i", ">", "<", "/", "p", ">", "<", "p", ">", "<", "b", ">", "weighted", "<", "/", "b", ">", "<", "/", "p", ">", "<", "p", ">", "route", "53", "returns", "the", "applicable", "value", "from", "one", "randomly", "selected", "instance", "from", "among", "the", "instances", "that", "you", "registered", "using", "the", "same", "service", "currently", "all", "records", "have", "the", "same", "weight", "so", "you", "can", "t", "route", "more", "or", "less", "traffic", "to", "any", "instances", "<", "/", "p", ">", "<", "p", ">", "for", "example", "suppose", "the", "service", "includes", "configurations", "for", "one", "a", "record", "and", "a", "health", "check", "and", "you", "use", "the", "service", "to", "register", "10", "instances", "route", "53", "responds", "to", "dns", "queries", "with", "the", "ip", "address", "for", "one", "randomly", "selected", "instance", "from", "among", "the", "healthy", "instances", "if", "no", "instances", "are", "healthy", "route", "53", "responds", "to", "dns", "queries", "as", "if", "all", "of", "the", "instances", "were", "healthy", "<", "/", "p", ">", "<", "p", ">", "if", "you", "don", "t", "define", "a", "health", "check", "for", "the", "service", "route", "53", "assumes", "that", "all", "instances", "are", "healthy", "and", "returns", "the", "applicable", "value", "for", "one", "randomly", "selected", "instance", "<", "/", "p", ">", "<", "p", ">", "for", "more", "information", "about", "the", "weighted", "routing", "policy", "see", "<", "a", "href", "=", "http", ":", "/", "/", "docs", "aws", "amazon", "com", "/", "route", "5", "3", "/", "latest", "/", "developer", "guide", "/", "routing", "-", "policy", "html", "#", "routing", "-", "policy", "-", "weighted", ">", "weighted", "routing", "<", "/", "a", ">", "in", "the", "<", "i", ">", "route", "53", "developer", "guide", "<", "/", "i", ">", "<", "/", "p", ">" ]
[ "this", "routing", "policy", "=", "routing", "policy", "to", "string", "(", ")", ";", "return", "this", ";" ]
[ "<", "p", ">", "an", "array", "that", "contains", "one", "<", "code", ">", "dns", "record", "<", "/", "code", ">", "object", "for", "each", "record", "that", "you", "want", "route", "53", "to", "create", "when", "you", "register", "an", "instance", "<", "/", "p", ">", "<", "p", ">", "<", "b", ">", "note", ":", "<", "/", "b", ">", "this", "method", "appends", "the", "values", "to", "the", "existing", "list", "(", "if", "any", ")", "use", "{", "@", "link", "#", "set", "dns", "records", "(", "java", "util", "collection", ")", "}", "or", "{", "@", "link", "#", "with", "dns", "records", "(", "java", "util", "collection", ")", "}", "if", "you", "want", "to", "override", "the", "existing", "values", "<", "/", "p", ">" ]
[ "if", "(", "this", "dns", "records", "=", "=", "null", ")", "{", "set", "dns", "records", "(", "new", "java", "util", "array", "list", "<", "dns", "record", ">", "(", "dns", "records", "length", ")", ")", ";", "}", "for", "(", "dns", "record", "ele", ":", "dns", "records", ")", "{", "this", "dns", "records", "add", "(", "ele", ")", ";", "}", "return", "this", ";" ]
[ "<", "p", ">", "an", "array", "that", "contains", "one", "<", "code", ">", "dns", "record", "<", "/", "code", ">", "object", "for", "each", "record", "that", "you", "want", "route", "53", "to", "create", "when", "you", "register", "an", "instance", "<", "/", "p", ">" ]
[ "set", "dns", "records", "(", "dns", "records", ")", ";", "return", "this", ";" ]
[ "consider", "changing", "input", "param", "as", "streams", "rather", "than", "fixed", "bytes", "?" ]
[ "byte", "array", "output", "stream", "out", ";", "g", "z", "i", "p", "input", "stream", "gzip", "=", "null", ";", "try", "{", "out", "=", "new", "byte", "array", "output", "stream", "(", ")", ";", "gzip", "=", "new", "g", "z", "i", "p", "input", "stream", "(", "data", ")", ";", "i", "o", "utils", "copy", "(", "gzip", ",", "out", ")", ";", "}", "catch", "(", "i", "o", "exception", "e", ")", "{", "throw", "new", "compression", "exception", "(", "compression", "constants", "decoding", "error", "+", "get", "content", "encoding", "name", "(", ")", ",", "e", ")", ";", "}", "finally", "{", "if", "(", "gzip", "!", "=", "null", ")", "{", "i", "o", "utils", "close", "quietly", "(", "gzip", ")", ";", "}", "}", "return", "out", "to", "byte", "array", "(", ")", ";" ]
[ "compose", "a", "new", "tweet" ]
[ "user", "user", "=", "user", "map", "get", "(", "user", "id", ")", ";", "if", "(", "user", "=", "=", "null", ")", "{", "user", "=", "new", "user", "(", "user", "id", ")", ";", "user", "map", "put", "(", "user", "id", ",", "user", ")", ";", "}", "user", "add", "tweet", "(", "new", "tweet", "(", "tweet", "id", ",", "tweet", "count", "+", "+", ")", ")", ";" ]
[ "retrieve", "the", "10", "most", "recent", "tweet", "ids", "in", "the", "user", "s", "news", "feed", "each", "item", "in", "the", "news", "feed", "must", "be", "posted", "by", "users", "who", "the", "user", "followed", "or", "by", "the", "user", "herself", "tweets", "must", "be", "ordered", "from", "most", "recent", "to", "least", "recent" ]
[ "user", "user", "=", "user", "map", "get", "(", "user", "id", ")", ";", "list", "<", "integer", ">", "result", "=", "new", "array", "list", "<", ">", "(", ")", ";", "if", "(", "user", "=", "=", "null", ")", "return", "result", ";", "set", "<", "integer", ">", "follwers", "=", "user", "get", "follow", "(", ")", ";", "if", "(", "follwers", "!", "=", "null", ")", "{", "list", "<", "tweet", ">", "tweets", "=", "new", "array", "list", "<", ">", "(", ")", ";", "tweets", "add", "all", "(", "user", "get", "tweets", "(", ")", ")", ";", "for", "(", "integer", "i", ":", "follwers", ")", "{", "user", "f", "=", "user", "map", "get", "(", "i", ")", ";", "if", "(", "f", "!", "=", "null", ")", "{", "tweets", "add", "all", "(", "f", "get", "tweets", "(", ")", ")", ";", "}", "}", "comparator", "<", "tweet", ">", "comparator", "=", "new", "comparator", "<", "tweet", ">", "(", ")", "{", "@", "override", "public", "int", "compare", "(", "tweet", "o", "1", ",", "tweet", "o", "2", ")", "{", "return", "long", "compare", "(", "o", "2", "time", ",", "o", "1", "time", ")", ";", "}", "}", ";", "collections", "sort", "(", "tweets", ",", "comparator", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "10", ";", "i", "+", "+", ")", "{", "if", "(", "i", ">", "=", "tweets", "size", "(", ")", ")", "break", ";", "result", "add", "(", "tweets", "get", "(", "i", ")", "id", ")", ";", "}", "}", "return", "result", ";" ]
[ "follower", "follows", "a", "followee", "if", "the", "operation", "is", "invalid", "it", "should", "be", "a", "no", "-", "op" ]
[ "if", "(", "follower", "id", "=", "=", "followee", "id", ")", "return", ";", "user", "user", "=", "user", "map", "get", "(", "follower", "id", ")", ";", "if", "(", "user", "=", "=", "null", ")", "user", "=", "new", "user", "(", "follower", "id", ")", ";", "user", "map", "put", "(", "follower", "id", ",", "user", ")", ";", "if", "(", "user", "map", "get", "(", "followee", "id", ")", "!", "=", "null", ")", "{", "user", "follow", "(", "user", "map", "get", "(", "followee", "id", ")", "id", ")", ";", "}", "else", "{", "user", "new", "user", "=", "new", "user", "(", "followee", "id", ")", ";", "user", "map", "put", "(", "followee", "id", ",", "new", "user", ")", ";", "user", "follow", "(", "user", "map", "get", "(", "followee", "id", ")", "id", ")", ";", "}" ]
[ "follower", "unfollows", "a", "followee", "if", "the", "operation", "is", "invalid", "it", "should", "be", "a", "no", "-", "op" ]
[ "user", "user", "=", "user", "map", "get", "(", "follower", "id", ")", ";", "if", "(", "user", "!", "=", "null", ")", "{", "user", "un", "follow", "(", "followee", "id", ")", ";", "}" ]
[ "computes", "the", "additional", "number", "of", "containers", "needed", "to", "accommodate", "a", "scale", "up", "/", "down", "operation" ]
[ "resource", "scale", "down", "resource", "=", "packing", "utils", "compute", "total", "resource", "change", "(", "topology", ",", "component", "changes", ",", "default", "instance", "resources", ",", "packing", "utils", "scaling", "direction", "down", ")", ";", "resource", "scale", "up", "resource", "=", "packing", "utils", "compute", "total", "resource", "change", "(", "topology", ",", "component", "changes", ",", "default", "instance", "resources", ",", "packing", "utils", "scaling", "direction", "up", ")", ";", "resource", "additional", "resource", "=", "scale", "up", "resource", "subtract", "absolute", "(", "scale", "down", "resource", ")", ";", "return", "(", "int", ")", "additional", "resource", "divide", "by", "(", "packing", "plan", "get", "max", "container", "resources", "(", ")", ")", ";" ]