当前位置: 首页>>代码示例>>Java>>正文


Java EntryEvent.getValue方法代码示例

本文整理汇总了Java中com.hazelcast.core.EntryEvent.getValue方法的典型用法代码示例。如果您正苦于以下问题:Java EntryEvent.getValue方法的具体用法?Java EntryEvent.getValue怎么用?Java EntryEvent.getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.hazelcast.core.EntryEvent的用法示例。


在下文中一共展示了EntryEvent.getValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: theEntryAdded

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
private void theEntryAdded(EntryEvent<String, DeploymentManagement> entryEvent) {

        DeploymentManagement deploymentManagement = entryEvent.getValue();
        Validate.notNull(deploymentManagement, "deploymentManagement must not be null");

        if (!deploymentManagement.getDeploymentDescription().
                getLocationInCluster().equals(gatewayRulesService.fetchGatewayRules().getLocation())) {
            if (LOG.isDebugEnabled()) LOG.debug("BeyondJManagementService ignoring incoming deploymentManagement " +
                            "since it references a service not in this instance. Current server is {} and target server is {}",
                    gatewayRulesService.fetchGatewayRules().getLocation(), deploymentManagement.getDeploymentDescription().
                            getLocationInCluster());
            return;
            //do nothing
        }

        try {
            String supervisorId = deploymentManagement.getDeploymentDescription().getSupervisorId();
            BeyondJRemotingService remotingService = new BeyondJRemotingService();
            ActorRefService actorRefService = remotingService.getRemoteServiceProxy(ActorRefService.class, ACTOR_REF_SERVICE);
            ActorRef deploymentSupervisor = actorRefService.getActorRefs().get(supervisorId);
            deploymentSupervisor.tell(deploymentManagement, null);
        } catch (Exception e) {
            LOG.error("Error calling actor", e);
        }
    }
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:26,代码来源:BeyondJHazelcastManagementService.java

示例2: entryAdded

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
@Override
public void entryAdded(EntryEvent<String, BpmEvent> event) {
    BpmEvent bpmEvent = event.getValue();
    logger.log(Level.INFO, "BpmEventListener.entryAdded executor {0}", new Object[]{bpmEvent.getExecutor()});
    try {
        BpmEvent.EXECUTOR executor = bpmEvent.getExecutor();
        switch (executor) {
            case ACTOR_RESOLVER:
                InternalAPI.get().executeActorResolver(bpmEvent.getCaseId(), bpmEvent.getTaskId());
                break;
            case CONNECTOR:
                InternalAPI.get().executeConnectorOut(bpmEvent.getCaseId(), bpmEvent.getTaskId());
                break;
            case JOIN:
                InternalAPI.get().executeJoin(bpmEvent.getCaseId(), bpmEvent.getTaskId(), bpmEvent.getJoinId());
                break;
            case TRANSITION:
                InternalAPI.get().executeTransition(bpmEvent.getCaseId(), bpmEvent.getTaskId());
                break;
        }
        HazelcastServer.removeBpmEvent(bpmEvent);
    } catch (Exception ex) {
        logger.log(Level.SEVERE, ex.getMessage(), ex);
    }
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:26,代码来源:BpmEventListener.java

示例3: entryUpdated

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
@Override
public void entryUpdated(EntryEvent<DeviceId, RoleValue> event) {
    // compare old and current RoleValues. If master is different,
    // emit MASTER_CHANGED. else, emit BACKUPS_CHANGED.
    RoleValue oldValue = event.getOldValue();
    RoleValue newValue = event.getValue();

    // There will be no oldValue at the very first instance of an EntryEvent.
    // Technically, the progression is: null event -> null master -> some master;
    // We say a null master and a null oldValue are the same condition.
    NodeId oldMaster = null;
    if (oldValue != null) {
        oldMaster = oldValue.get(MASTER);
    }
    NodeId newMaster = newValue.get(MASTER);

    if (!Objects.equal(oldMaster, newMaster)) {
        notifyDelegate(new MastershipEvent(
                MASTER_CHANGED, event.getKey(), event.getValue().roleInfo()));
    } else {
        notifyDelegate(new MastershipEvent(
                BACKUPS_CHANGED, event.getKey(), event.getValue().roleInfo()));
    }
}
 
开发者ID:ravikumaran2015,项目名称:ravikumaran201504,代码行数:25,代码来源:DistributedMastershipStore.java

示例4: entryAdded

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
@Override
public void entryAdded(EntryEvent<String, DeploymentDescription> entryEvent) {
    if (entryEvent == null || entryEvent.getValue() == null) {
        throw new RuntimeException("Received a null message. Something is wrong");
    }

    for (DestinationDiscoveryCallback callback : callBacks) {
        System.out.println("CALLBACK IS " + callback);
        callback.destinationAdded(entryEvent);
    }
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:12,代码来源:HazelcastDestinationDiscoveryRequestListener.java

示例5: entryEvicted

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
@Override
public void entryEvicted(EntryEvent<String, DeploymentDescription> entryEvent) {
    if (entryEvent == null || entryEvent.getValue() == null) {
        throw new RuntimeException("Received a null message. Something is wrong");
    }

    for (DestinationDiscoveryCallback callback : callBacks) {
        callback.destinationEntryEvicted(entryEvent);
    }
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:11,代码来源:HazelcastDestinationDiscoveryRequestListener.java

示例6: entryRemoved

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
@Override
public void entryRemoved(EntryEvent<String, DeploymentDescription> entryEvent) {
    if (entryEvent == null || entryEvent.getValue() == null) {
        throw new RuntimeException("Received a null message. Something is wrong");
    }

    for (DestinationDiscoveryCallback callback : callBacks) {
        callback.destinationEntryRemoved(entryEvent);
    }
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:11,代码来源:HazelcastDestinationDiscoveryRequestListener.java

示例7: entryUpdated

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
@Override
public void entryUpdated(EntryEvent<String, DeploymentDescription> entryEvent) {
    if (entryEvent == null || entryEvent.getValue() == null) {
        throw new RuntimeException("Received a null message. Something is wrong");
    }

    for (DestinationDiscoveryCallback callback : callBacks) {
        callback.destinationUpdated(entryEvent);
    }
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:11,代码来源:HazelcastDestinationDiscoveryRequestListener.java

示例8: entryAdded

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
@Override
public void entryAdded(Object object) {

    EntryEvent<String, DeploymentManagement> entryEvent =
            (EntryEvent<String, DeploymentManagement>) object;
    DeploymentManagement deploymentManagement = entryEvent.getValue();
    Validate.notNull(deploymentManagement, "deploymentManagement must not be null");

    if (!deploymentManagement.getDeploymentDescription().
            getLocationInCluster().equals(gatewayRulesService.fetchGatewayRules().getLocation())) {
        if (LOG.isDebugEnabled()) LOG.debug("BeyondJManagementService ignoring incoming deploymentManagement " +
                        "since it references a service not in this instance. Current server is {} and target server is {}",
                gatewayRulesService.fetchGatewayRules().getLocation(), deploymentManagement.getDeploymentDescription().
                        getLocationInCluster());
        return;
        //do nothing
    }

    try {
        String supervisorId = deploymentManagement.getDeploymentDescription().getSupervisorId();
        BeyondJRemotingService remotingService = new BeyondJRemotingService();
        ActorRefService actorRefService = remotingService.getRemoteServiceProxy(ActorRefService.class, ACTOR_REF_SERVICE);
        ActorRef deploymentSupervisor = actorRefService.getActorRefs().get(supervisorId);
        deploymentSupervisor.tell(deploymentManagement, null);
    } catch (Exception e) {
        LOG.error("Error calling actor", e);
    }
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:29,代码来源:BeyondJConsulManagementService.java

示例9: entryUpdated

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
@Override
public void entryUpdated(EntryEvent<String, T> event) {
    T entity = event.getValue();
    T oldEntity = event.getOldValue();
    LOG.trace("Modified entity {} in map {}", entity, event.getName());
    listener.onEvent(entity, oldEntity, StorageEvent.MODIFIED);
}
 
开发者ID:meridor,项目名称:perspective-backend,代码行数:8,代码来源:StorageImpl.java

示例10: entryUpdated

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
@Override
public void entryUpdated(EntryEvent<String, Path> event) {
	Path path = event.getValue();
	cachePath.put(path.getPathId(), path);
	Set<Path> paths = cacheType.get(path.getRoot());
	if (paths == null) {
		paths = new HashSet<>();
		Set<Path> paths2 = cacheType.putIfAbsent(path.getRoot(), paths);
		if (paths2 != null) {
			paths = paths2;
		}
	}
	paths.add(path);
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:15,代码来源:ModelManagementImpl.java

示例11: entryRemoved

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
@Override
public void entryRemoved(EntryEvent<String, Path> event) {
	Path path = event.getValue();
	cachePath.remove(path.getPathId());
	Set<Path> paths = cacheType.get(path.getRoot());
	if (paths != null) {
		paths.remove(path);
	}
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:10,代码来源:ModelManagementImpl.java

示例12: entryAdded

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
@Override
public void entryAdded(EntryEvent<String, Path> event) {
	Path path = event.getValue();
	cachePath.putIfAbsent(path.getPathId(), path);
	Set<Path> paths = cacheType.get(path.getRoot());
	if (paths == null) {
		paths = new HashSet<>();
		Set<Path> paths2 = cacheType.putIfAbsent(path.getRoot(), paths);
		if (paths2 != null) {
			paths = paths2;
		}
	}
	paths.add(path);
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:15,代码来源:ModelManagementImpl.java

示例13: entryRemoved

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
public void entryRemoved(EntryEvent event) {
    if (event == null || (event.getValue() == null && event.getOldValue() == null)) {
        // Nothing to remove
        return;
    }
    byte[] nodeID = StringUtils.getBytes(event.getMember().getUuid());
    if (!XMPPServer.getInstance().getNodeID().equals(nodeID)) {
        String sender = event.getKey().toString();
        nodePresences.get(NodeID.getInstance(nodeID)).remove(sender);
    }
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:12,代码来源:ClusterListener.java

示例14: getHandlers

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
Collection<JID> getHandlers(EntryEvent event) {
    Object value = event.getValue();
    Collection<JID> answer = new ArrayList<JID>();
    if (value != null) {
        for (DirectedPresence directedPresence : (Collection<DirectedPresence>)value) {
            answer.add(directedPresence.getHandler());
        }
    }
    return answer;
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:11,代码来源:ClusterListener.java

示例15: getReceivers

import com.hazelcast.core.EntryEvent; //导入方法依赖的package包/类
Set<String> getReceivers(EntryEvent event, JID handler) {
    Object value = event.getValue();
    for (DirectedPresence directedPresence : (Collection<DirectedPresence>)value) {
        if (directedPresence.getHandler().equals(handler)) {
            return directedPresence.getReceivers();
        }
    }
    return Collections.emptySet();
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:10,代码来源:ClusterListener.java


注:本文中的com.hazelcast.core.EntryEvent.getValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。