Examples of SerializingTranscoder


Examples of net.spy.memcached.transcoders.SerializingTranscoder

    @Override
    public T remove( String key )
    {
        String prefixedKey = prefix( key );
        Object old = client.get( prefixedKey, new SerializingTranscoder() );
        if( old != null )
        {
            client.delete( prefixedKey );
        }
        return valueType.cast( old );
View Full Code Here

Examples of net.spy.memcached.transcoders.SerializingTranscoder

    }

    @Override
    public void put( String key, T value )
    {
        client.set( prefix( key ), expiration, value, new SerializingTranscoder() );
    }
View Full Code Here

Examples of net.spy.memcached.transcoders.SerializingTranscoder

                return new MemcachedClient(getMemcachedNodes());
            }

            @Provides
            public CASMutator createCASMutator(MemcachedClient memcachedClient) {
                return new CASMutator(memcachedClient, new SerializingTranscoder());
            }


        });
    }
View Full Code Here

Examples of net.spy.memcached.transcoders.SerializingTranscoder

        return uniqueInstance;

    }

    private MemcachedImpl() throws IOException {
        tc = new SerializingTranscoder() {

            @Override
            protected Object deserialize(byte[] data) {
                try {
                    return new ObjectInputStream(new ByteArrayInputStream(data)) {
View Full Code Here

Examples of net.spy.memcached.transcoders.SerializingTranscoder

                              final NinjaProperties ninjaProperties) throws Exception {
       
        this.logger = logger;
        this.ninjaProperties = ninjaProperties;
       
        this.tc = new SerializingTranscoder() {

            @Override
            protected Object deserialize(byte[] data) {
                try {
                    return new ObjectInputStream(new ByteArrayInputStream(data)) {
View Full Code Here

Examples of net.spy.memcached.transcoders.SerializingTranscoder

  /* (non-Javadoc)
   * @see net.spy.memcached.ConnectionFactory#getDefaultTranscoder()
   */
  public Transcoder<Object> getDefaultTranscoder() {
    return new SerializingTranscoder();
  }
View Full Code Here

Examples of net.spy.memcached.transcoders.SerializingTranscoder

   * (non-Javadoc)
   *
   * @see net.spy.memcached.ConnectionFactory#getDefaultTranscoder()
   */
  public Transcoder<Object> getDefaultTranscoder() {
    return new SerializingTranscoder();
  }
View Full Code Here

Examples of net.spy.memcached.transcoders.SerializingTranscoder

  /**
   * Attempt to get the object represented by the given serialized bytes.
   */
  private Object deserialize() {
    SerializingTranscoder tc = new SerializingTranscoder();
    CachedData d = new CachedData(this.getItemFlags(), this.getValue(),
      CachedData.MAX_SIZE);
    Object rv = null;
    rv = tc.decode(d);
    return rv;
  }
View Full Code Here

Examples of net.spy.memcached.transcoders.SerializingTranscoder

    }
    if(cf.getOperationTimeout() <= 0) {
      throw new IllegalArgumentException(
        "Operation timeout must be positive.");
    }
    transcoder=new SerializingTranscoder();
    opFact=cf.getOperationFactory();
    assert opFact != null : "Connection factory failed to make op factory";
    conn=cf.createConnection(addrs);
    assert conn != null : "Connection factory failed to make a connection";
    operationTimeout = cf.getOperationTimeout();
View Full Code Here

Examples of net.spy.memcached.transcoders.SerializingTranscoder

        return uniqueInstance;

    }

    private MemcachedImpl() throws IOException {
        tc = new SerializingTranscoder() {

            @Override
            protected Object deserialize(byte[] data) {
                try {
                    return new ObjectInputStream(new ByteArrayInputStream(data)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.