def Set(self, index, value): msg=listcodec.ListSetCodec.encodeRequest( encode.encodestring(self.title), encode.encodeint32(index), value) retryable=msg.retryable self.connection.adjustCorrelationId(msg) correlationid=msg.correlation self.connection.sendPackage(msg) response=self.connection.getPackageWithCorrelationId(correlationid,retryable) msg2=ClientMessage.decodeMessage(response) return listcodec.ListSetCodec.decodeResponse(msg2).response
def GetAndReplace(self, key, value, expiryPolicy, completionId): msg=cachecodec.CacheGetAndReplaceCodec.encodeRequest( encode.encodestring(self.title), key, value, expiryPolicy, encode.encodeint32(completionId)) retryable=msg.retryable self.connection.adjustCorrelationId(msg) correlationid=msg.correlation self.connection.sendPackage(msg.encodeMessage()) response=self.connection.receivePackageWithCorrelationId(correlationid,retryable) msg2=ClientMessage.decodeMessage(response) return cachecodec.CacheGetAndReplaceCodec.decodeResponse(msg2).response
def EntryProcessor(self, key, entryProcessor, arguments, completionId): msg=cachecodec.CacheEntryProcessorCodec.encodeRequest( encode.encodestring(self.title), key, entryProcessor, arguments, encode.encodeint32(completionId)) retryable=msg.retryable self.connection.adjustCorrelationId(msg) correlationid=msg.correlation self.connection.sendPackage(msg.encodeMessage()) response=self.connection.receivePackageWithCorrelationId(correlationid,retryable) msg2=ClientMessage.decodeMessage(response) return cachecodec.CacheEntryProcessorCodec.decodeResponse(msg2).response
def RemoveAll(self, completionId): msg=cachecodec.CacheRemoveAllCodec.encodeRequest( encode.encodestring(self.title), encode.encodeint32(completionId)) retryable=msg.retryable self.connection.adjustCorrelationId(msg) correlationid=msg.correlation self.connection.sendPackage(msg.encodeMessage()) response=self.connection.receivePackageWithCorrelationId(correlationid,retryable) msg2=ClientMessage.decodeMessage(response) return cachecodec.CacheRemoveAllCodec.decodeResponse(msg2)
def ManagementConfig(self, isStat, enabled, hostname, port): msg=cachecodec.CacheManagementConfigCodec.encodeRequest( encode.encodestring(self.title), encode.encodeboolean(isStat), encode.encodeboolean(enabled), encode.encodestring(hostname), encode.encodeint32(port)) retryable=msg.retryable self.connection.adjustCorrelationId(msg) correlationid=msg.correlation self.connection.sendPackage(msg.encodeMessage()) response=self.connection.receivePackageWithCorrelationId(correlationid,retryable) msg2=ClientMessage.decodeMessage(response) return cachecodec.CacheManagementConfigCodec.decodeResponse(msg2).response
def ListenerRegistration(self, listenerConfig, register, hostname, port): msg=cachecodec.CacheListenerRegistrationCodec.encodeRequest( encode.encodestring(self.title), listenerConfig, encode.encodeboolean(register), encode.encodestring(hostname), encode.encodeint32(port)) retryable=msg.retryable self.connection.adjustCorrelationId(msg) correlationid=msg.correlation self.connection.sendPackage(msg.encodeMessage()) response=self.connection.receivePackageWithCorrelationId(correlationid,retryable) msg2=ClientMessage.decodeMessage(response) return cachecodec.CacheListenerRegistrationCodec.decodeResponse(msg2)
def Iterate(self, partitionId, tableIndex, batch): msg=cachecodec.CacheIterateCodec.encodeRequest( encode.encodestring(self.title), encode.encodeint32(partitionId), encode.encodeint32(tableIndex), encode.encodeint32(batch)) retryable=msg.retryable self.connection.adjustCorrelationId(msg) correlationid=msg.correlation self.connection.sendPackage(msg.encodeMessage()) response=self.connection.receivePackageWithCorrelationId(correlationid,retryable) msg2=ClientMessage.decodeMessage(response) return cachecodec.CacheIterateCodec.decodeResponse(msg2).response
def DrainToMaxSize(self, maxSize): msg=queuecodec.QueueDrainToMaxSizeCodec.encodeRequest( encode.encodestring(self.title), encode.encodeint32(maxSize)) retryable=msg.retryable self.connection.adjustCorrelationId(msg) correlationid=msg.correlation self.connection.sendPackage(msg.encodeMessage()) response=self.connection.receivePackageWithCorrelationId(correlationid,retryable) msg2=ClientMessage.decodeMessage(response) return queuecodec.QueueDrainToMaxSizeCodec.decodeResponse(msg2)