|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.perforce.p4java.impl.mapbased.rpc.RpcPropertyDefs
public class RpcPropertyDefs
A convenience class used to hold all publicly-visible properties keys used by the RPC implementation.
The intention here is to simply centralize property key names so end users have some idea what's available and what each key's semantics are. This is NOT intended as a full property repository -- property management is generally up to individual classes and packages.
Note that in general, all properties can have an optional short form ("NICK", Anglo-English for nickname...) which is typically just the full form without the cumbersome com.perforce.whatever prefix; use of the short form is particularly convenient for passing in properties through the url mechanism, but you have to be very careful that there are no conflicting system or environmental properties...
Note that if you add a property somewhere that's likely to be useful to end users, you should use the mechanism here to document it.
| Field Summary | |
|---|---|
static int |
RPC_DEFAULT_FILE_BUF_SIZE
Default size in bytes of the "standard" file I/O buffer. |
static String |
RPC_DEFAULT_FILE_BUF_SIZE_NICK
Short form for the RPC_DEFAULT_FILE_BUF_SIZE property key. |
static int |
RPC_DEFAULT_FILETYPE_PEEK_SIZE
Default size in bytes of the "peek" we take into local files to try to infer from the contents what type the file is. |
static int |
RPC_DEFAULT_QUEUE_SIZE
Default blocking queue size used in RPC send / recv queues; size is in elements. |
static String |
RPC_DEFAULT_QUEUE_SIZE_NICK
If this property is set, attempt to set the underlying RPC connection's queue lengths to the associated value, in elements. |
static int |
RPC_DEFAULT_RECV_BYTE_BUF_SIZE
Default size in bytes of the "standard" recv byte buffer. |
static String |
RPC_DEFAULT_RECV_BYTE_BUF_SIZE_NICK
Short form for the RPC_DEFAULT_RECV_BYTE_BUF_SIZE property key. |
static int |
RPC_DEFAULT_SEND_BYTE_BUF_SIZE
Default size in bytes of the "standard" send byte buffer. |
static String |
RPC_DEFAULT_SEND_BYTE_BUF_SIZE_NICK
Short form for the RPC_DEFAULT_SEND_BYTE_BUF_SIZE property key. |
static String |
RPC_PROPERTY_PREFIX
The standard property name prefix for all RPC properties. |
static String |
RPC_RELAX_CMD_NAME_CHECKS_NICK
If this property is set and equals "true", do not perform command metadata checks in the RPC layer. |
static int |
RPC_SOCKET_POOL_DEFAULT_SIZE
Default number of sockets retained in pool |
static String |
RPC_SOCKET_POOL_SIZE_NICK
Number of sockets to retain in pool when released |
static String |
RPC_SOCKET_RECV_BUF_SIZE_NICK
If this property is set, attempt to set the underlying RPC socket's system receive buffer size to the associated value, in bytes. |
static String |
RPC_SOCKET_SEND_BUF_SIZE_NICK
If this property is set, attempt to set the underlying RPC socket's system send buffer size to the associated value, in bytes. |
static String |
RPC_SOCKET_SO_TIMEOUT_NICK
If this property is set, it is interpreted as the number of milliseconds to use for RPC socket read or write timeouts. |
static String |
RPC_SOCKET_USE_KEEPALIVE_NICK
If this property is set and starts with "n" or "N", DON'T use the socket keepalive option. |
| Constructor Summary | |
|---|---|
RpcPropertyDefs()
|
|
| Method Summary | |
|---|---|
static String |
getProperty(Properties props,
String nick)
Convenience method to first try to get the short form from the passed-in properties, then try for the long form. |
static String |
getProperty(Properties props,
String nick,
String defaultValue)
Convenience method to first try to get the short form from the passed-in properties, then try for the long form. |
static boolean |
getPropertyAsBoolean(Properties props,
String nick,
boolean defaultValue)
Return a named property a boolean, if possible. |
static int |
getPropertyAsInt(Properties props,
String nick,
int defaultValue)
Return a named property as an int, if possible. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String RPC_PROPERTY_PREFIX
public static final int RPC_DEFAULT_SEND_BYTE_BUF_SIZE
public static final int RPC_DEFAULT_RECV_BYTE_BUF_SIZE
public static final String RPC_DEFAULT_SEND_BYTE_BUF_SIZE_NICK
public static final String RPC_DEFAULT_RECV_BYTE_BUF_SIZE_NICK
public static final int RPC_DEFAULT_FILE_BUF_SIZE
public static final String RPC_DEFAULT_FILE_BUF_SIZE_NICK
public static final int RPC_DEFAULT_FILETYPE_PEEK_SIZE
public static final String RPC_SOCKET_USE_KEEPALIVE_NICK
public static final String RPC_SOCKET_SO_TIMEOUT_NICK
public static final String RPC_SOCKET_RECV_BUF_SIZE_NICK
public static final String RPC_SOCKET_SEND_BUF_SIZE_NICK
public static final int RPC_DEFAULT_QUEUE_SIZE
public static final String RPC_DEFAULT_QUEUE_SIZE_NICK
public static final String RPC_SOCKET_POOL_SIZE_NICK
public static final int RPC_SOCKET_POOL_DEFAULT_SIZE
public static final String RPC_RELAX_CMD_NAME_CHECKS_NICK
| Constructor Detail |
|---|
public RpcPropertyDefs()
| Method Detail |
|---|
public static String getProperty(Properties props,
String nick)
Note: this method is null safe, i.e. if either or both props or nick is null, it simply returns null.
public static String getProperty(Properties props,
String nick,
String defaultValue)
Note: this method is null safe, i.e. if either or both props or nick is null, it simply returns null.
public static int getPropertyAsInt(Properties props,
String nick,
int defaultValue)
Will log to P4JLog any conversion error as a warning.
Note: this method is null safe, i.e. if either or both props or nick is null, it simply returns defaultValue.
public static boolean getPropertyAsBoolean(Properties props,
String nick,
boolean defaultValue)
Will log to P4JLog any conversion error as a warning.
Note: this method is null safe, i.e. if either or both props or nick is null, it simply returns defaultValue.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||