Package eu.mosaic_cloud.platform.interop.common.kv

Examples of eu.mosaic_cloud.platform.interop.common.kv.KeyValueMessage


      {
        final String key = (String) parameters[0];
        final EncodingMetadata expectedEncoding = (EncodingMetadata) parameters[1];
        final Future<Object> opResult = MemcachedOperationFactory.this.mcClient.asyncGet (key);
        final byte[] data = (byte[]) opResult.get ();
        KeyValueMessage kvMessage = null;
        kvMessage = new KeyValueMessage (key, data, expectedEncoding.getContentEncoding (), expectedEncoding.getContentType ());
        return kvMessage;
      }
    });
  }
View Full Code Here


      @Override
      public Boolean call ()
          throws ExecutionException,
            InterruptedException
      {
        final KeyValueMessage kvMessage = (KeyValueMessage) parameters[0];
        final long cas = MemcachedOperationFactory.this.mcClient.gets (kvMessage.getKey ()).getCas ();
        final Future<Boolean> opResult = MemcachedOperationFactory.this.mcClient.prepend (cas, kvMessage.getKey (), kvMessage.getData ());
        return opResult.get ();
      }
    });
  }
View Full Code Here

      @Override
      public Boolean call ()
          throws ExecutionException,
            InterruptedException
      {
        final KeyValueMessage kvMessage = (KeyValueMessage) parameters[0];
        final int exp = (Integer) parameters[1];
        final Future<Boolean> opResult = MemcachedOperationFactory.this.mcClient.replace (kvMessage.getKey (), exp, kvMessage.getData ());
        return opResult.get ();
      }
    });
  }
View Full Code Here

      @Override
      public Boolean call ()
          throws ExecutionException,
            InterruptedException
      {
        final KeyValueMessage kvMessage = (KeyValueMessage) parameters[0];
        final String key = kvMessage.getKey ();
        int exp = 0;
        final byte[] data = kvMessage.getData ();
        if (parameters.length == 2) {
          exp = (Integer) parameters[1];
        }
        final Future<Boolean> opResult = MemcachedOperationFactory.this.mcClient.set (key, exp, data);
        return opResult.get ();
View Full Code Here

TOP

Related Classes of eu.mosaic_cloud.platform.interop.common.kv.KeyValueMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.