{"id":1828,"date":"2014-12-17T16:21:28","date_gmt":"2014-12-17T16:21:28","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=1828"},"modified":"2023-06-27T23:16:55","modified_gmt":"2023-06-28T06:16:55","slug":"whats-new-couchbase-java-sdk-12","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/es\/whats-new-couchbase-java-sdk-12\/","title":{"rendered":"Novedades de Couchbase Java SDK 1.2"},"content":{"rendered":"<p><em style=\"line-height: 23px;font-family: ff-meta-serif-web-pro-1, ff-meta-serif-web-pro-2, Georgia, 'Times New Roman', Times, serif\">[This blog was syndicated from https:\/\/nitschinger.at\/]<\/em><\/p>\n<p>Para todos los usuarios de nuestro Java SDK, hemos preparado algunas buenas adiciones para usted. Este post los cubre en detalle y muestra c\u00f3mo se puede obtener m\u00e1s productivo<\/p>\n<p>Tenga en cuenta que esta entrada de blog asume que est\u00e1 ejecutando la versi\u00f3n 1.2.1, ya que ha habido algunos peque\u00f1os cambios entre 1.2.0 y 1.2.1 que afectan, por ejemplo, al soporte de oyentes y a la recopilaci\u00f3n de m\u00e9tricas.<\/p>\n<h2>Distribuci\u00f3n central de Maven<\/h2>\n<p>Desde la versi\u00f3n 1.2.0 en adelante, el Java SDK se distribuye directamente desde Maven Central. Esto significa que ya no necesitas incluir el repositorio de Couchbase. El siguiente c\u00f3digo maven es suficiente para empezar (ten en cuenta que el groupId ha cambiado):<\/p>\n<div class=\"geshifilter\">\n<div class=\"xml geshifilter-xml\" style=\"font-family: monospace\"><span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&lt;dependencias<span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><\/span><br \/>\n<span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&lt;dependencia<span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><\/span><br \/>\n<span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&lt;idGrupo<span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><\/span>com.couchbase.client<span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><br \/>\n<span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&lt;artifactId<span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><\/span>couchbase-client<span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><br \/>\n<span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&lt;versi\u00f3n<span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><\/span>1.2.1<span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><br \/>\n<span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><br \/>\n<span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><\/div>\n<\/div>\n<p>Esto cargar\u00e1 autom\u00e1ticamente la \u00faltima dependencia de spymemcached tambi\u00e9n (para 1.2.0 es 2.10.0). Antes de profundizar en lo que ha cambiado, <a href=\"https:\/\/docs.couchbase.com\/couchbase-sdk-java-1.2\/#release-notes-for-couchbase-client-library-java-120-ga-13-september-2013\">aqu\u00ed<\/a>\u00a0son las notas de la versi\u00f3n para una referencia r\u00e1pida.<\/p>\n<h2>Soporte para oyentes<\/h2>\n<div>Hasta ahora, hab\u00eda dos formas de obtener el resultado de una petici\u00f3n as\u00edncrona. O bien bloqueando el hilo actual de esta manera:<\/div>\n<div><\/div>\n<div class=\"geshifilter\">\n<div class=\"java geshifilter-java\" style=\"font-family: monospace\"><span style=\"color: #666666;font-style: italic\">\/\/ realiza una operaci\u00f3n as\u00edncrona (devuelve inmediatamente)<\/span><br \/>\nOperaci\u00f3nFuturo<span style=\"color: #339933\">&lt;<\/span>Booleano<span style=\"color: #339933\">&gt;<\/span> setFuture <span style=\"color: #339933\">=<\/span> cliente.<span style=\"color: #006633\">configure<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">\"llave\"<\/span>, <span style=\"color: #0000ff\">\"valor\"<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/p>\n<p><span style=\"color: #666666;font-style: italic\">\/\/ bloquear el hilo actual<\/span><br \/>\n<a href=\"https:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3Aboolean+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky\"><span style=\"color: #003399\">Booleano<\/span><\/a> resultado <span style=\"color: #339933\">=<\/span> setFuture.<span style=\"color: #006633\">consiga<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/div>\n<\/div>\n<div><\/div>\n<div>O para hacer un bucle en los m\u00e9todos de futuros no bloqueantes. Esto es especialmente \u00fatil si se trata de una lista de futuros.<\/div>\n<div><\/div>\n<div>\n<div class=\"geshifilter\">\n<div class=\"java geshifilter-java\" style=\"font-family: monospace\">Lista<span style=\"color: #339933\">&lt;<\/span>Operaci\u00f3nFuturo<span style=\"color: #339933\">&lt;<\/span>Booleano<span style=\"color: #339933\">&gt;&gt;<\/span> futuros <span style=\"color: #339933\">=<\/span> <span style=\"color: #000000;font-weight: bold\">nuevo<\/span> ArrayList<span style=\"color: #339933\">&lt;<\/span>Operaci\u00f3nFuturo<span style=\"color: #339933\">&lt;<\/span>Booleano<span style=\"color: #339933\">&gt;&gt;<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\n<span style=\"color: #000000;font-weight: bold\">para<\/span> <span style=\"color: #009900\">(<\/span><span style=\"color: #000066;font-weight: bold\">int<\/span> i <span style=\"color: #339933\">=<\/span> <span style=\"color: #cc66cc\">0<\/span><span style=\"color: #339933\">;<\/span> i <span style=\"color: #339933\">&lt;<\/span> <span style=\"color: #cc66cc\">100<\/span><span style=\"color: #339933\">;<\/span> i<span style=\"color: #339933\">++<\/span><span style=\"color: #009900\">)<\/span> <span style=\"color: #009900\">{<\/span><br \/>\nfuturos.<span style=\"color: #006633\">a\u00f1ada<\/span><span style=\"color: #009900\">(<\/span>cliente.<span style=\"color: #006633\">configure<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">\"llave-\"<\/span> <span style=\"color: #339933\">+<\/span> i, <span style=\"color: #0000ff\">\"valor\"<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><\/p>\n<p><span style=\"color: #000000;font-weight: bold\">mientras que<\/span> <span style=\"color: #009900\">(<\/span><span style=\"color: #339933\">!<\/span>futuros.<span style=\"color: #006633\">isEmpty<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #009900\">)<\/span> <span style=\"color: #009900\">{<\/span><br \/>\nIterador<span style=\"color: #339933\">&lt;<\/span>Operaci\u00f3nFuturo<span style=\"color: #339933\">&lt;<\/span>Booleano<span style=\"color: #339933\">&gt;&gt;<\/span> iter <span style=\"color: #339933\">=<\/span> futuros.<span style=\"color: #006633\">iterador<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\n<span style=\"color: #000000;font-weight: bold\">mientras que<\/span> <span style=\"color: #009900\">(<\/span>iter.<span style=\"color: #006633\">hasNext<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #009900\">)<\/span> <span style=\"color: #009900\">{<\/span><br \/>\nOperaci\u00f3nFuturo<span style=\"color: #339933\">&lt;<\/span>Booleano<span style=\"color: #339933\">&gt;<\/span> futuro <span style=\"color: #339933\">=<\/span> iter.<span style=\"color: #006633\">siguiente<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\n<span style=\"color: #000000;font-weight: bold\">si<\/span> <span style=\"color: #009900\">(<\/span>futuro.<span style=\"color: #006633\">isDone<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #009900\">)<\/span> <span style=\"color: #009900\">{<\/span><br \/>\niter.<span style=\"color: #006633\">eliminar<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><\/div>\n<\/div>\n<\/div>\n<div><\/div>\n<div>Ahora, desde la versi\u00f3n 1.2.0, hay una nueva forma de tratar las respuestas: a\u00f1adiendo listeners. La idea es suministrar una llamada de retorno al futuro que se ejecutar\u00e1 una vez que la operaci\u00f3n se haya realizado. Aqu\u00ed se muestra un ejemplo sencillo:<\/div>\n<div><\/div>\n<div>\n<div class=\"geshifilter\">\n<div class=\"java geshifilter-java\" style=\"font-family: monospace\">Operaci\u00f3nFuturo<span style=\"color: #339933\">&lt;<\/span>Booleano<span style=\"color: #339933\">&gt;<\/span> setFuture <span style=\"color: #339933\">=<\/span> cliente.<span style=\"color: #006633\">configure<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">\"llave\"<\/span>, <span style=\"color: #0000ff\">\"valor\"<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\nsetFuture.<span style=\"color: #006633\">addListener<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #000000;font-weight: bold\">nuevo<\/span> OperationCompletionListener<span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span> <span style=\"color: #009900\">{<\/span><br \/>\n@Override<br \/>\n<span style=\"color: #000000;font-weight: bold\">p\u00fablico<\/span> <span style=\"color: #000066;font-weight: bold\">void<\/span> onComplete<span style=\"color: #009900\">(<\/span>Operaci\u00f3nFuturo<span style=\"color: #339933\">&lt;?&gt;<\/span> futuro<span style=\"color: #009900\">)<\/span> <span style=\"color: #000000;font-weight: bold\">lanza<\/span> <a href=\"https:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky\"><span style=\"color: #003399\">Excepci\u00f3n<\/span><\/a> <span style=\"color: #009900\">{<\/span><br \/>\n<a href=\"https:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky\"><span style=\"color: #003399\">Sistema<\/span><\/a>.<span style=\"color: #006633\">fuera<\/span>.<span style=\"color: #006633\">println<\/span><span style=\"color: #009900\">(<\/span>futuro.<span style=\"color: #006633\">consiga<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/div>\n<\/div>\n<\/div>\n<div><\/div>\n<div>Note that the `.get()` method on the future will not block anymore because the result is already computed. Whatever you put in the callback method will be executed asynchronously on the thread pool. To see how flexible that approach is, let&#8217;s rewrite the example from above waiting until the 100 futures are done.<\/div>\n<div><\/div>\n<div>\n<div class=\"geshifilter\">\n<div class=\"java geshifilter-java\" style=\"font-family: monospace\"><span style=\"color: #000000;font-weight: bold\">final<\/span> CountDownLatch pestillo <span style=\"color: #339933\">=<\/span> <span style=\"color: #000000;font-weight: bold\">nuevo<\/span> CountDownLatch<span style=\"color: #009900\">(<\/span><span style=\"color: #cc66cc\">100<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\n<span style=\"color: #000000;font-weight: bold\">para<\/span> <span style=\"color: #009900\">(<\/span><span style=\"color: #000066;font-weight: bold\">int<\/span> i <span style=\"color: #339933\">=<\/span> <span style=\"color: #cc66cc\">0<\/span><span style=\"color: #339933\">;<\/span> i <span style=\"color: #339933\">&lt;<\/span> <span style=\"color: #cc66cc\">100<\/span><span style=\"color: #339933\">;<\/span> i<span style=\"color: #339933\">++<\/span><span style=\"color: #009900\">)<\/span> <span style=\"color: #009900\">{<\/span><br \/>\nOperaci\u00f3nFuturo<span style=\"color: #339933\">&lt;<\/span>Booleano<span style=\"color: #339933\">&gt;<\/span> futuro <span style=\"color: #339933\">=<\/span> cliente.<span style=\"color: #006633\">configure<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">\"llave-\"<\/span> <span style=\"color: #339933\">+<\/span> i, <span style=\"color: #0000ff\">\"valor\"<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\nfuturo.<span style=\"color: #006633\">addListener<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #000000;font-weight: bold\">nuevo<\/span> OperationCompletionListener<span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span> <span style=\"color: #009900\">{<\/span><br \/>\n@Override<br \/>\n<span style=\"color: #000000;font-weight: bold\">p\u00fablico<\/span> <span style=\"color: #000066;font-weight: bold\">void<\/span> onComplete<span style=\"color: #009900\">(<\/span>Operaci\u00f3nFuturo<span style=\"color: #339933\">&lt;?&gt;<\/span> futuro<span style=\"color: #009900\">)<\/span> <span style=\"color: #000000;font-weight: bold\">lanza<\/span> <a href=\"https:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky\"><span style=\"color: #003399\">Excepci\u00f3n<\/span><\/a> <span style=\"color: #009900\">{<\/span><br \/>\nPicaporte.<span style=\"color: #006633\">countDown<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><br \/>\nPicaporte.<span style=\"color: #006633\">await<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/div>\n<\/div>\n<\/div>\n<div><\/div>\n<div>Aqu\u00ed utilizamos un <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/concurrent\/CountDownLatch.html\">CountDownLatch<\/a>\u00a0que espera en el hilo actual mientras se haya contado cien veces. Exactamente lo que necesitamos en nuestra situaci\u00f3n, pero el c\u00f3digo es mucho m\u00e1s f\u00e1cil de leer. Y lo que es m\u00e1s importante, es mucho m\u00e1s flexible porque se pueden hacer otras cosas como lanzar una nueva petici\u00f3n, consultar un servicio web o calcular un resultado.<\/div>\n<div><\/div>\n<div>It is also possible to override the default `ExecutorService` implementation with a custom one. This may be needed if the default behavior (Basically a upper-bounded cachedThreadPool) does not suite your needs. Also, you should use this approach if you create a bunch of `CouchbaseClient` instances so you can share the same service across all of them.<\/div>\n<div><\/div>\n<div>\n<div class=\"geshifilter\">\n<div class=\"java geshifilter-java\" style=\"font-family: monospace\"><span style=\"color: #666666;font-style: italic\">\/\/ Crear el Constructor<\/span><br \/>\nConstructor de CouchbaseConnectionFactoryBuilder <span style=\"color: #339933\">=<\/span> <span style=\"color: #000000;font-weight: bold\">nuevo<\/span> CouchbaseConnectionFactoryBuilder<span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/p>\n<p><span style=\"color: #666666;font-style: italic\">\/\/ Crear un pool de hilos de 5 hilos fijos<\/span><br \/>\nServicio ExecutorService <span style=\"color: #339933\">=<\/span> Ejecutores.<span style=\"color: #006633\">newFixedThreadPool<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #cc66cc\">5<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/p>\n<p><span style=\"color: #666666;font-style: italic\">\/\/ Configurarlo en el constructor<\/span><br \/>\nconstructor.<span style=\"color: #006633\">setListenerExecutorService<\/span><span style=\"color: #009900\">(<\/span>servicio<span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/p>\n<p><span style=\"color: #666666;font-style: italic\">\/\/ Crear la instancia<\/span><br \/>\nCliente CouchbaseClient <span style=\"color: #339933\">=<\/span> <span style=\"color: #000000;font-weight: bold\">nuevo<\/span> CouchbaseClient<span style=\"color: #009900\">(<\/span>constructor.<span style=\"color: #006633\">buildCouchbaseConnection<\/span><span style=\"color: #009900\">(<\/span>&#8230;<span style=\"color: #009900\">)<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/div>\n<\/div>\n<\/div>\n<h2>Capacidades mejoradas de elaboraci\u00f3n de perfiles<\/h2>\n<div>Obtener informaci\u00f3n sobre una aplicaci\u00f3n en ejecuci\u00f3n siempre es dif\u00edcil, as\u00ed que nos propusimos hac\u00e9rtelo m\u00e1s f\u00e1cil. Incorporamos una biblioteca llamada m\u00e9trica que perfila, en funci\u00f3n del nivel de configuraci\u00f3n elegido.<\/div>\n<div><\/div>\n<div>Antes de poder utilizarlo, debe a\u00f1adir esta dependencia opcional:<\/div>\n<div><\/div>\n<div class=\"geshifilter\">\n<div class=\"xml geshifilter-xml\" style=\"font-family: monospace\"><span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&lt;dependencia<span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><\/span><br \/>\n<span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&lt;idGrupo<span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><\/span>com.codahale.metrics<span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><br \/>\n<span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&lt;artifactId<span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><\/span>m\u00e9trica-n\u00facleo<span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><br \/>\n<span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&lt;versi\u00f3n<span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><\/span>3.0.1<span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><br \/>\n<span style=\"color: #009900\"><span style=\"color: #000000;font-weight: bold\">&gt;<\/span><\/span><\/div>\n<\/div>\n<div><\/div>\n<div>En el constructor, hay un m\u00e9todo que permite activar el perfilador:<\/div>\n<div><\/div>\n<div class=\"geshifilter\">\n<div class=\"java geshifilter-java\" style=\"font-family: monospace\">Constructor de CouchbaseConnectionFactoryBuilder <span style=\"color: #339933\">=<\/span> <span style=\"color: #000000;font-weight: bold\">nuevo<\/span> CouchbaseConnectionFactoryBuilder<span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\n<span style=\"color: #666666;font-style: italic\">\/\/ activar la recogida de m\u00e9tricas<\/span><br \/>\nconstructor.<span style=\"color: #006633\">setEnableMetrics<\/span><span style=\"color: #009900\">(<\/span>MetricType.<span style=\"color: #006633\">RENDIMIENTO<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/div>\n<\/div>\n<div><\/div>\n<div>If you look at the `MetricType` enumeration you can see that there are three types of values you can choose from: OFF (which keeps metric collection off), PERFORMANCE (which only collects performance-relevant metrics) and DEBUG (which collects all kinds of metrics, including the performance ones). While the metrics library is quite efficient, keep in mind that metric collection takes some resources away from your application.<\/div>\n<div><\/div>\n<div>Por defecto, la informaci\u00f3n m\u00e9trica se imprimir\u00e1 en la consola cada 30 segundos. Puede ejecutar el siguiente c\u00f3digo de prueba desde su IDE y ver c\u00f3mo se ve:<\/div>\n<div><\/div>\n<div>\n<div class=\"geshifilter\">\n<div class=\"java geshifilter-java\" style=\"font-family: monospace\">Constructor de CouchbaseConnectionFactoryBuilder <span style=\"color: #339933\">=<\/span> <span style=\"color: #000000;font-weight: bold\">nuevo<\/span> CouchbaseConnectionFactoryBuilder<span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\nconstructor.<span style=\"color: #006633\">setEnableMetrics<\/span><span style=\"color: #009900\">(<\/span>MetricType.<span style=\"color: #006633\">RENDIMIENTO<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/p>\n<p>CouchbaseConnectionFactory cf <span style=\"color: #339933\">=<\/span><br \/>\nconstructor.<span style=\"color: #006633\">buildCouchbaseConnection<\/span><span style=\"color: #009900\">(<\/span><a href=\"https:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3Aarrays+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky\"><span style=\"color: #003399\">Matrices<\/span><\/a>.<span style=\"color: #006633\">asList<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #000000;font-weight: bold\">nuevo<\/span> URI<span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">\u201chttps:\/\/127.0.0.1:8091\/pools\u201d<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #009900\">)<\/span>, <span style=\"color: #0000ff\">\"por defecto\"<\/span>, <span style=\"color: #0000ff\">&#8220;&#8221;<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\nCliente CouchbaseClient <span style=\"color: #339933\">=<\/span> <span style=\"color: #000000;font-weight: bold\">nuevo<\/span> CouchbaseClient<span style=\"color: #009900\">(<\/span>cf<span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/p>\n<p><span style=\"color: #000000;font-weight: bold\">mientras que<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #000066;font-weight: bold\">verdadero<\/span><span style=\"color: #009900\">)<\/span> <span style=\"color: #009900\">{<\/span><br \/>\ncliente.<span style=\"color: #006633\">configure<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">\"foo\"<\/span>, <span style=\"color: #0000ff\">\"bar\"<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\n<a href=\"https:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3Athread+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky\"><span style=\"color: #003399\">Hilo<\/span><\/a>.<span style=\"color: #006633\">dormir<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #cc66cc\">100<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\n<span style=\"color: #009900\">}<\/span><\/div>\n<\/div>\n<div><\/div>\n<\/div>\n<div>Ahora espera 30 segundos y ver\u00e1s una salida como esta en la consola:<\/div>\n<div><\/div>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace\">10\/8\/13 12:04:14 PM ============================================================<\/p>\n<p>- Histogramas ----------------------<\/p>\n<p>[MEM] Promedio de Bytes le\u00eddos del SO por lectura<\/p>\n<p>recuento = 893<\/p>\n<p>m\u00edn = 24<\/p>\n<p>m\u00e1x = 24<\/p>\n<p>media = 24,00<\/p>\n<p>stddev = 0.00<\/p>\n<p>mediana = 24,00<\/p>\n<p>75% &lt;= 24.00<\/p>\n<p>95% &lt;= 24.00<\/p>\n<p>98% &lt;= 24.00<\/p>\n<p>99% &lt;= 24.00<\/p>\n<p>99,9% &lt;= 24,00<\/p>\n<p>[MEM] Promedio de bytes escritos en el SO por escritura<\/p>\n<p>recuento = 893<\/p>\n<p>m\u00edn = 38<\/p>\n<p>m\u00e1x = 38<\/p>\n<p>media = 38,00<\/p>\n<p>stddev = 0.00<\/p>\n<p>mediana = 38,00<\/p>\n<p>75% &lt;= 38.00<\/p>\n<p>95% &lt;= 38.00<\/p>\n<p>98% &lt;= 38.00<\/p>\n<p>99% &lt;= 38.00<\/p>\n<p>99,9% &lt;= 38,00<\/p>\n<p>[MEM] Tiempo medio en el cable para las operaciones (\u00c2\u00b5s)<\/p>\n<p>recuento = 893<\/p>\n<p>m\u00edn = 179<\/p>\n<p>m\u00e1x = 1730<\/p>\n<p>media = 263,80<\/p>\n<p>stddev = 75,43<\/p>\n<p>mediana = 251,00<\/p>\n<p>75% &lt;= 280.00<\/p>\n<p>95% &lt;= 351.90<\/p>\n<p>98% &lt;= 425.36<\/p>\n<p>99% &lt;= 559,70<\/p>\n<p>99,9% &lt;= 1730,00<\/p>\n<p>- Metros ------------------------<\/p>\n<p>[MEM] Tasa de solicitud: Todos<\/p>\n<p>recuento = 893<\/p>\n<p>tasa media = 9,92 eventos\/segundo<\/p>\n<p>Tasa de 1 minuto = 9,85 eventos\/segundo<\/p>\n<p>Tasa de 5 minutos = 9,68 eventos\/segundo<\/p>\n<p>Tasa de 15 minutos = 9,63 eventos\/segundo<\/p>\n<p>[Tasa de respuesta: Todas (Fallo + \u00c9xito + Reintento)<\/p>\n<p>recuento = 893<\/p>\n<p>tasa media = 9,92 eventos\/segundo<\/p>\n<p>Tasa de 1 minuto = 9,85 eventos\/segundo<\/p>\n<p>Tasa de 5 minutos = 9,68 eventos\/segundo<\/p>\n<p>Tasa de 15 minutos = 9,63 eventos\/segundo<\/p><\/div>\n<\/div>\n<div><\/div>\n<div>I won&#8217;t go into detail of all these metrics in this blog post, please refer to the documentation for a more complete picture. One more thing I want to show you is that the metrics library is also able to expose these metrics through JMX. All you need to do is set a system property that changes the output mode: `net.spy.metrics.reporter.type=jmx`. Other possible settings are `csv` and slf4j`. If you choose a logger that prints out information at a given interval you can change it by setting `net.spy.metrics.reporter.interval` to anything else than 30.<\/div>\n<div><\/div>\n<div>So if you put the line `System.setProperty(&#8220;net.spy.metrics.reporter.type&#8221;, &#8220;jmx&#8221;);` before the code shown above, you can open (for example) jConsole and switch to the MBeans tab of the application. You&#8217;ll see a `metrics` subsection exposed that contains the same metrics as they would show up in the logs.<\/div>\n<div><\/div>\n<h2>CAS con caducidad<\/h2>\n<div>Before 1.2.0, it was not possible in one command to do a `cas` update and set a new expiration at the same time. You had to do a second `touch` operation which was not efficient nor atomic. Now, the API exposes a new `cas()` method that allows you to pass in the expiration time at the same time. It is easy to use:<\/div>\n<div><\/div>\n<div class=\"geshifilter\">\n<div class=\"java geshifilter-java\" style=\"font-family: monospace\">cliente.<span style=\"color: #006633\">cas<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">\"llave\"<\/span>cas, nuevaVencimiento, valor<span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/div>\n<\/div>\n<div><\/div>\n<div>Las variaciones as\u00edncronas tambi\u00e9n est\u00e1n expuestas desde la versi\u00f3n 1.2.1.<\/div>\n<div><\/div>\n<h2>Inicializaci\u00f3n mediante propiedades<\/h2>\n<div>One thing that comes in handy if your cluster ip addresses change often is that you can now initialize a `CouchbaseClient` object based on system properties. Here is an example:<\/div>\n<div><\/div>\n<div>\n<div class=\"geshifilter\">\n<div class=\"java geshifilter-java\" style=\"font-family: monospace\"><a href=\"https:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky\"><span style=\"color: #003399\">Sistema<\/span><\/a>.<span style=\"color: #006633\">setProperty<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">&#8220;cbclient.nodes&#8221;<\/span>, <span style=\"color: #0000ff\">\u201chttps:\/\/127.0.0.1:8091\/pools\u201d<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\n<a href=\"https:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky\"><span style=\"color: #003399\">Sistema<\/span><\/a>.<span style=\"color: #006633\">setProperty<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">&#8220;cbclient.bucket&#8221;<\/span>, <span style=\"color: #0000ff\">\"por defecto\"<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\n<a href=\"https:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky\"><span style=\"color: #003399\">Sistema<\/span><\/a>.<span style=\"color: #006633\">setProperty<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #0000ff\">&#8220;cbclient.password&#8221;<\/span>, <span style=\"color: #0000ff\">&#8220;&#8221;<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/p>\n<p>Constructor de CouchbaseConnectionFactoryBuilder <span style=\"color: #339933\">=<\/span> <span style=\"color: #000000;font-weight: bold\">nuevo<\/span> CouchbaseConnectionFactoryBuilder<span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\nCouchbaseConnectionFactory cf <span style=\"color: #339933\">=<\/span> constructor.<span style=\"color: #006633\">buildCouchbaseConnection<\/span><span style=\"color: #009900\">(<\/span><span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><br \/>\nCliente CouchbaseClient <span style=\"color: #339933\">=<\/span> <span style=\"color: #000000;font-weight: bold\">nuevo<\/span> CouchbaseClient<span style=\"color: #009900\">(<\/span>cf<span style=\"color: #009900\">)<\/span><span style=\"color: #339933\">;<\/span><\/div>\n<\/div>\n<\/div>\n<div><\/div>\n<div>Of course you can set these properties in your application container or during startup, so it&#8217;s very flexible and not tied into your code directly. Note that if you forget to set one of these properties, the code will warn you like this:<\/div>\n<div><\/div>\n<div class=\"geshifilter\">\n<div class=\"text geshifilter-text\" style=\"font-family: monospace\">Exception in thread &#8220;main&#8221; java.lang.IllegalArgumentException: System property cbclient.nodes not set or empty<br \/>\nat com.couchbase.client.CouchbaseConnectionFactory.(CouchbaseConnectionFactory.java:160)<br \/>\nat com.couchbase.client.CouchbaseConnectionFactoryBuilder$2.(CouchbaseConnectionFactoryBuilder.java:318)<br \/>\nat com.couchbase.client.CouchbaseConnectionFactoryBuilder.buildCouchbaseConnection(CouchbaseConnectionFactoryBuilder.java:318)<br \/>\nat Principal.main(Principal.java:33)<br \/>\nat sun.reflect.NativeMethodAccessorImpl.invoke0(M\u00e9todo Nativo)<br \/>\nat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<br \/>\nat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br \/>\nat java.lang.reflect.Method.invoke(Method.java:601)<br \/>\nat com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)<\/div>\n<\/div>\n<div><\/div>\n<h2>Otros cambios<\/h2>\n<div>In addition to the enhancements shown above, the release includes &#8211; as always &#8211; numerous smaller bugfixes. The default poll interval for `ReplicateTo` and `PersistTo` has been lowered to `10ms` to account for performance changes that went into the Couchbase Sever 2.2 release. Also, the client now uses the `CRAM-MD5` authentication mechanism automatically if the server supports it (since 2.2 as well).<\/div>\n<div><\/div>\n<div>Estas incre\u00edbles nuevas funciones deber\u00edan ser motivo suficiente para actualizar ahora mismo. Si hay algo que no funciona como esperabas, por favor pregunta al servicio de atenci\u00f3n al cliente o abre un ticket. <a href=\"https:\/\/www.couchbase.com\/blog\/es\/issues\/browse\/JCBC\/\">aqu\u00ed<\/a>.<\/div>","protected":false},"excerpt":{"rendered":"<p>[This blog was syndicated from https:\/\/nitschinger.at\/] For all users of our Java SDK, we prepared some nice additions for you. This post covers them in detail and shows how you can get more productive Note that this blog post assumes [&hellip;]<\/p>","protected":false},"author":19,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"ppma_author":[8987],"class_list":["post-1828","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.0 (Yoast SEO v26.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What&#039;s new in the Couchbase Java SDK 1.2 - The Couchbase Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/es\/whats-new-couchbase-java-sdk-12\/\" \/>\n<meta property=\"og:locale\" content=\"es_MX\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What&#039;s new in the Couchbase Java SDK 1.2\" \/>\n<meta property=\"og:description\" content=\"[This blog was syndicated from https:\/\/nitschinger.at\/] For all users of our Java SDK, we prepared some nice additions for you. This post covers them in detail and shows how you can get more productive Note that this blog post assumes [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/es\/whats-new-couchbase-java-sdk-12\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-12-17T16:21:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-28T06:16:55+00:00\" \/>\n<meta name=\"author\" content=\"Michael Nitschinger\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@daschl\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Nitschinger\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/\"},\"author\":{\"name\":\"Michael Nitschinger\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/e5d4d332756da6f361dd88c1576de61d\"},\"headline\":\"What&#8217;s new in the Couchbase Java SDK 1.2\",\"datePublished\":\"2014-12-17T16:21:28+00:00\",\"dateModified\":\"2023-06-28T06:16:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/\"},\"wordCount\":1469,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"Uncategorized\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/\",\"name\":\"What's new in the Couchbase Java SDK 1.2 - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2014-12-17T16:21:28+00:00\",\"dateModified\":\"2023-06-28T06:16:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What&#8217;s new in the Couchbase Java SDK 1.2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/e5d4d332756da6f361dd88c1576de61d\",\"name\":\"Michael Nitschinger\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/95e178617974d46e3b02dd1754a3f60b\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/dad99b5e02a74ca4bec14352e9da710160647a97290814b669babb3aac0ea675?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/dad99b5e02a74ca4bec14352e9da710160647a97290814b669babb3aac0ea675?s=96&d=mm&r=g\",\"caption\":\"Michael Nitschinger\"},\"description\":\"Michael Nitschinger works as a Principal Software Engineer at Couchbase. He is the architect and maintainer of the Couchbase Java SDK, one of the first completely reactive database drivers on the JVM. He also authored and maintains the Couchbase Spark Connector. Michael is active in the open source community, a contributor to various other projects like RxJava and Netty.\",\"sameAs\":[\"https:\/\/nitschinger.at\",\"https:\/\/x.com\/daschl\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/es\/author\/michael-nitschinger\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"What's new in the Couchbase Java SDK 1.2 - The Couchbase Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/es\/whats-new-couchbase-java-sdk-12\/","og_locale":"es_MX","og_type":"article","og_title":"What's new in the Couchbase Java SDK 1.2","og_description":"[This blog was syndicated from https:\/\/nitschinger.at\/] For all users of our Java SDK, we prepared some nice additions for you. This post covers them in detail and shows how you can get more productive Note that this blog post assumes [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/es\/whats-new-couchbase-java-sdk-12\/","og_site_name":"The Couchbase Blog","article_published_time":"2014-12-17T16:21:28+00:00","article_modified_time":"2023-06-28T06:16:55+00:00","author":"Michael Nitschinger","twitter_card":"summary_large_image","twitter_creator":"@daschl","twitter_misc":{"Written by":"Michael Nitschinger","Est. reading time":"7 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/"},"author":{"name":"Michael Nitschinger","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/e5d4d332756da6f361dd88c1576de61d"},"headline":"What&#8217;s new in the Couchbase Java SDK 1.2","datePublished":"2014-12-17T16:21:28+00:00","dateModified":"2023-06-28T06:16:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/"},"wordCount":1469,"commentCount":1,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","articleSection":["Uncategorized"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/","url":"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/","name":"What's new in the Couchbase Java SDK 1.2 - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2014-12-17T16:21:28+00:00","dateModified":"2023-06-28T06:16:55+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/whats-new-couchbase-java-sdk-12\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"What&#8217;s new in the Couchbase Java SDK 1.2"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"El blog de Couchbase","description":"Couchbase, la base de datos NoSQL","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"El blog de Couchbase","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/e5d4d332756da6f361dd88c1576de61d","name":"Michael Nitschinger","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/95e178617974d46e3b02dd1754a3f60b","url":"https:\/\/secure.gravatar.com\/avatar\/dad99b5e02a74ca4bec14352e9da710160647a97290814b669babb3aac0ea675?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dad99b5e02a74ca4bec14352e9da710160647a97290814b669babb3aac0ea675?s=96&d=mm&r=g","caption":"Michael Nitschinger"},"description":"Michael Nitschinger trabaja como Ingeniero de Software Principal en Couchbase. Es el arquitecto y mantenedor del SDK Java de Couchbase, uno de los primeros controladores de bases de datos completamente reactivos en la JVM. Tambi\u00e9n es autor y mantiene el conector Spark de Couchbase. Michael participa activamente en la comunidad de c\u00f3digo abierto, contribuyendo a otros proyectos como RxJava y Netty.","sameAs":["https:\/\/nitschinger.at","https:\/\/x.com\/daschl"],"url":"https:\/\/www.couchbase.com\/blog\/es\/author\/michael-nitschinger\/"}]}},"authors":[{"term_id":8987,"user_id":19,"is_guest":0,"slug":"michael-nitschinger","display_name":"Michael Nitschinger","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/dad99b5e02a74ca4bec14352e9da710160647a97290814b669babb3aac0ea675?s=96&d=mm&r=g","author_category":"","last_name":"Nitschinger, Principal Software Engineer, Couchbase","first_name":"Michael","job_title":"","user_url":"https:\/\/nitschinger.at","description":"Michael Nitschinger trabaja como Ingeniero de Software Principal en Couchbase. Es el arquitecto y mantenedor del SDK Java de Couchbase, uno de los primeros controladores de bases de datos completamente reactivos en la JVM. Tambi\u00e9n es autor y mantiene el conector Spark de Couchbase. Michael participa activamente en la comunidad de c\u00f3digo abierto, contribuyendo a otros proyectos como RxJava y Netty."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/1828","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/comments?post=1828"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/1828\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/media?parent=1828"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/categories?post=1828"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/tags?post=1828"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/ppma_author?post=1828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}