Exemplo n.º 1
0
void Codec20::writeExpirationParams(transport::Transport& t,uint64_t lifespan, uint64_t maxIdle) const {
	uint32_t lInt= (uint32_t) lifespan;
	uint32_t mInt= (uint32_t) maxIdle;
	if ( lInt != lifespan)
		throw HotRodClientException("lifespan exceed 32bit integer");
	if ( mInt != maxIdle)
		throw HotRodClientException("maxIdle exceed 32bit integer");
	t.writeVInt(lInt);
    t.writeVInt(mInt);
}
Exemplo n.º 2
0
std::vector<char> Codec20::returnPossiblePrevValue(transport::Transport& t, uint8_t status, uint32_t /*flags*/) const{
	std::vector<char> result;
	if (HotRodConstants::hasPrevious(status)) {
		TRACEBYTES("return value = ", result);
		result = t.readArray();
	} else {
		TRACE("No return value");
	}
return result;
}
Exemplo n.º 3
0
ClientCacheEntryExpiredEvent<std::vector<char>> Codec21::readExpiredEvent(transport::Transport &transport) const
{
    std::vector<char> key = transport.readArray();
    return ClientCacheEntryExpiredEvent<std::vector<char>>(key);
}
Exemplo n.º 4
0
void Codec21::writeClientListenerParams(transport::Transport& t, const ClientListener& clientListener,
		const std::vector<std::vector<char> > &filterFactoryParams, const std::vector<std::vector<char> > &converterFactoryParams) const
{
	Codec20::writeClientListenerParams(t,clientListener, filterFactoryParams, converterFactoryParams);
	t.writeByte((short)(clientListener.useRawData ? 1 : 0));
}