|
||||||||||
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 String |
RPC_APPLICATION_NAME_NICK
If this property is set, attempt to set the underlying RPC protocol 'app' tag to the associated value. |
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 String |
RPC_DEFAULT_PROPERTY_DELIMITER
The default property delimiter for RPC properties. |
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 String |
RPC_DEFAULT_SECURE_SOCKET_ENABLED_PROTOCOLS
Default secure socket enabled protocol versions. |
static String |
RPC_DEFAULT_SECURE_SOCKET_PROTOCOL
Default secure socket protocol. |
static boolean |
RPC_DEFAULT_SECURE_SOCKET_SET_ENABLED_PROTOCOLS
Default secure socket set enabled protocols. |
static boolean |
RPC_DEFAULT_SECURE_SOCKET_TRUST_ALL
Default secure socket trust all certificates (i.e. |
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 String |
RPC_SECURE_SOCKET_ENABLED_PROTOCOLS_NICK
If this property is set, attempt to set enabled protocol versions (SSLSocket.setEnabledProtocols()) for the connection. |
static String |
RPC_SECURE_SOCKET_PROTOCOL_NICK
If this property is set, attempt to instantiate the SSLContext with the associated value. |
static String |
RPC_SECURE_SOCKET_SET_ENABLED_PROTOCOLS_NICK
If this property is set and equals "false", do not attempt to set enabled protocol versions (SSLSocket.setEnabledProtocols()) for the connection and use the protocol versions currently enabled for the connection. |
static String |
RPC_SECURE_SOCKET_TRUST_ALL_NICK
If this property is set and equals "false", do not trust all certificates. |
static int[] |
RPC_SOCKET_PERFORMANCE_PREFERENCES_DEFAULT
Default socket performance preferences are described by three integers whose values indicate the relative importance of short connection time, low latency, and high bandwidth. |
static String |
RPC_SOCKET_PERFORMANCE_PREFERENCES_NICK
If this property is set, attempt to set the underlying RPC socket's performance preferences to the associated values, in integers, delimited by commas. |
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 int |
RPC_SOCKET_SO_TIMEOUT_DEFAULT
Default number of milliseconds to use for RPC socket read or write timeouts. |
static String |
RPC_SOCKET_SO_TIMEOUT_NICK
The number of milliseconds to use for RPC socket read or write timeouts. |
static boolean |
RPC_SOCKET_TCP_NO_DELAY_DEFAULT
Default setting for enable/disable TCP_NODELAY (disable/enable Nagle's algorithm). |
static String |
RPC_SOCKET_TCP_NO_DELAY_NICK
If this property is set, attempt to use the associated value to enable/disable TCP_NODELAY (disable/enable Nagle's algorithm). |
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. |
static int[] |
getPropertyAsIntArray(Properties props,
String nick,
String delimiter,
int[] defaultValues)
Return a named property as an int array, 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 String RPC_DEFAULT_PROPERTY_DELIMITER
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 boolean RPC_SOCKET_TCP_NO_DELAY_DEFAULT
public static final String RPC_SOCKET_TCP_NO_DELAY_NICK
public static final String RPC_SOCKET_USE_KEEPALIVE_NICK
public static final int RPC_SOCKET_SO_TIMEOUT_DEFAULT
public static final String RPC_SOCKET_SO_TIMEOUT_NICK
public static final int[] RPC_SOCKET_PERFORMANCE_PREFERENCES_DEFAULT
public static final String RPC_SOCKET_PERFORMANCE_PREFERENCES_NICK
The absolute values of the integers are irrelevant; in order to choose a protocol the values are simply compared, with larger values indicating stronger preferences. Negative values represent a lower priority than positive values.
If the application prefers short connection time over both low latency and high bandwidth, for example, then it could invoke this method with the values (1, 0, 0). If the application prefers high bandwidth above low latency, and low latency above short connection time, then it could invoke this method with the values (0, 1, 2).
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_SECURE_SOCKET_TRUST_ALL_NICK
public static final boolean RPC_DEFAULT_SECURE_SOCKET_TRUST_ALL
public static final String RPC_SECURE_SOCKET_PROTOCOL_NICK
Use Security.getProviders(), Provider.getServices() and Service.getAlgorithm() to list all the providers and the algorithms supporter.
public static final String RPC_DEFAULT_SECURE_SOCKET_PROTOCOL
public static final String RPC_SECURE_SOCKET_SET_ENABLED_PROTOCOLS_NICK
public static final boolean RPC_DEFAULT_SECURE_SOCKET_SET_ENABLED_PROTOCOLS
public static final String RPC_SECURE_SOCKET_ENABLED_PROTOCOLS_NICK
Use SSLSocket.getSupportedProtocols() and SSLSocket.getEnabledProtocols() to list all supported and enabled protocol versions for the connection.
public static final String RPC_DEFAULT_SECURE_SOCKET_ENABLED_PROTOCOLS
The current server (12.1) limit the protocol version support to the IETF-standard TLSv1.
public static final String RPC_RELAX_CMD_NAME_CHECKS_NICK
public static final String RPC_APPLICATION_NAME_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 int[] getPropertyAsIntArray(Properties props, String nick, String delimiter, int[] defaultValues)
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 an empty int array.
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 |