com.hazelcast.ascii.memcache
Class SetCommandProcessor

java.lang.Object
  extended by com.hazelcast.ascii.AbstractTextCommandProcessor<T>
      extended by com.hazelcast.ascii.memcache.MemcacheCommandProcessor<SetCommand>
          extended by com.hazelcast.ascii.memcache.SetCommandProcessor
All Implemented Interfaces:
TextCommandProcessor<SetCommand>

public class SetCommandProcessor
extends MemcacheCommandProcessor<SetCommand>


Field Summary
 
Fields inherited from class com.hazelcast.ascii.memcache.MemcacheCommandProcessor
DEFAULT_MAP_NAME, MAP_NAME_PRECEDER
 
Fields inherited from class com.hazelcast.ascii.AbstractTextCommandProcessor
textCommandService
 
Constructor Summary
SetCommandProcessor(TextCommandService textCommandService)
           
 
Method Summary
 void handle(SetCommand setCommand)
          "set" means "store this data".
 void handleRejection(SetCommand request)
           
 
Methods inherited from class com.hazelcast.ascii.memcache.MemcacheCommandProcessor
byteArrayToLong, concatenate, longToByteArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetCommandProcessor

public SetCommandProcessor(TextCommandService textCommandService)
Method Detail

handle

public void handle(SetCommand setCommand)
"set" means "store this data".

"add" means "store this data, but only if the server *doesn't* already hold data for this key".

"replace" means "store this data, but only if the server *does* already hold data for this key".

After sending the command line and the data block the client awaits the reply, which may be:

- "STORED\r\n", to indicate success.

- "NOT_STORED\r\n" to indicate the data was not stored, but not because of an error. This normally means that either that the condition for an "add" or a "replace" command wasn't met, or that the item is in a delete queue (see the "delete" command below).


handleRejection

public void handleRejection(SetCommand request)


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.