Package com.abiquo.redis.client

Examples of com.abiquo.redis.client.TransactionBlock2


        hash.put(ManagerUsernameKey, nullToEmpty(hypervisor.getManagerUser()));
        hash.put(ManagerPasswordKey, nullToEmpty(hypervisor.getManagerPassword()));
        hash.put(AgentUsernameKey, nullToEmpty(hypervisor.getAgentUser()));
        hash.put(AgentPasswordKey, nullToEmpty(hypervisor.getAgentPassword()));

        TransactionBlock2 transactionBlock = new TransactionBlock2()
        {
            @Override
            public void execute() throws JedisException
            {
                String id = valueOf(hypervisor.getId());
View Full Code Here


            return Optional.absent();
        }

        final Map<String, String> hash = redis.hgetAll(nest(HypervisorNamespace, id));

        TransactionBlock2 transactionBlock = new TransactionBlock2()
        {
            @Override
            public void execute() throws JedisException
            {
                String cacheId = hash.get(VirtualMachinesCacheKey);
View Full Code Here

            {
                hash.put(HypervisorIdKey, valueOf(hypervisorId));
            }
        }

        TransactionBlock2 transactionBlock = new TransactionBlock2()
        {
            @Override
            public void execute() throws JedisException
            {
                String id = valueOf(subscription.getId());
View Full Code Here

        if (find(id, redis) == null)
        {
            return Optional.absent();
        }

        TransactionBlock2 transactionBlock = new TransactionBlock2()
        {
            @Override
            public void execute() throws JedisException
            {
                srem(nest(VirtualMachineNamespace, AllNamespace), id);
View Full Code Here

        }

        final String id = valueOf(subscription.getId());
        final Optional<Subscription> persisted = find(id, redis);

        TransactionBlock2 transactionBlock = new TransactionBlock2()
        {
            @Override
            public void execute() throws JedisException
            {
                if (persisted.isPresent())
View Full Code Here

        if (find(id, redis) == null)
        {
            return Optional.absent();
        }

        TransactionBlock2 transactionBlock = new TransactionBlock2()
        {
            @Override
            public void execute() throws JedisException
            {
                srem(nest(VirtualMachineNamespace, AllNamespace), id);
View Full Code Here

        if (isNullOrEmpty(definition.getName()))
        {
            throw new RuntimeException("VirtualMachineIdentifier name is a required field");
        }

        TransactionBlock2 transactionBlock = new TransactionBlock2()
        {
            @Override
            public void execute() throws JedisException
            {
                set(generateKey(definition), serialize(definition));
View Full Code Here

        if (!find(definition, redis).isPresent())
        {
            return absent();
        }

        TransactionBlock2 transactionBlock = new TransactionBlock2()
        {
            @Override
            public void execute() throws JedisException
            {
                del(generateKey(definition));
View Full Code Here

        hash.put(AgentPortKey, extractPort(hypervisor.getAgentPort()));
        hash.put(AgentUsernameKey, nullToEmpty(hypervisor.getAgentUser()));
        hash.put(AgentPasswordKey, nullToEmpty(hypervisor.getAgentPassword()));
        hash.put(VirtualMachinesCacheKey, valueOf(cacheId));

        TransactionBlock2 transactionBlock = new TransactionBlock2()
        {
            @Override
            public void execute() throws JedisException
            {
                String id = valueOf(hypervisor.getId());
View Full Code Here

            return Optional.absent();
        }

        final Map<String, String> hash = redis.hgetAll(nest(HypervisorNamespace, id));

        TransactionBlock2 transactionBlock = new TransactionBlock2()
        {
            @Override
            public void execute() throws JedisException
            {
                String cacheId = hash.get(VirtualMachinesCacheKey);
View Full Code Here

TOP

Related Classes of com.abiquo.redis.client.TransactionBlock2

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.