Package com.hazelcast.core

Examples of com.hazelcast.core.ItemListener


    public Object call() throws Exception {
        final ClientEndpoint endpoint = getEndpoint();
        final ClientEngine clientEngine = getClientEngine();
        final QueueService service = getService();

        ItemListener listener = new ItemListener() {
            public void itemAdded(ItemEvent item) {
                send(item);
            }

            public void itemRemoved(ItemEvent item) {
View Full Code Here


    @Override
    public void initialize() {
        final NodeEngine nodeEngine = getNodeEngine();
        final List<ItemListenerConfig> itemListenerConfigs = config.getItemListenerConfigs();
        for (ItemListenerConfig itemListenerConfig : itemListenerConfigs) {
            ItemListener listener = itemListenerConfig.getImplementation();
            if (listener == null && itemListenerConfig.getClassName() != null) {
                try {
                    listener = ClassLoaderUtil.newInstance(nodeEngine.getConfigClassLoader(), itemListenerConfig.getClassName());
                } catch (Exception e) {
                    throw ExceptionUtil.rethrow(e);
View Full Code Here

    protected QueueMBean(IQueue managedObject, ManagementService service) {
        super(managedObject, service);
        objectName = service.createObjectName("IQueue", managedObject.getName());
        //todo: using the event system to register number of adds/remove is an very expensive price to pay.
        ItemListener itemListener = new ItemListener() {
            @Override
            public void itemAdded(ItemEvent item) {
                totalAddedItemCount.incrementAndGet();
            }
View Full Code Here

    public void initialize() {
        final NodeEngine nodeEngine = getNodeEngine();
        CollectionConfig config = getConfig(nodeEngine);
        final List<ItemListenerConfig> itemListenerConfigs = config.getItemListenerConfigs();
        for (ItemListenerConfig itemListenerConfig : itemListenerConfigs) {
            ItemListener listener = itemListenerConfig.getImplementation();
            if (listener == null && itemListenerConfig.getClassName() != null) {
                try {
                    listener = ClassLoaderUtil.newInstance(nodeEngine.getConfigClassLoader(), itemListenerConfig.getClassName());
                } catch (Exception e) {
                    throw ExceptionUtil.rethrow(e);
View Full Code Here

    private final String registrationId;

    protected SetMBean(ISet managedObject, ManagementService service) {
        super(managedObject, service);
        objectName = service.createObjectName("ISet", managedObject.getName());
        ItemListener itemListener = new ItemListener() {
            public void itemAdded(ItemEvent item) {
                totalAddedItemCount.incrementAndGet();
            }

            public void itemRemoved(ItemEvent item) {
View Full Code Here

    protected ListMBean(IList<?> managedObject, ManagementService service) {
        super(managedObject, service);
        objectName = service.createObjectName("IList", managedObject.getName());

        //todo: using the event system to register number of adds/remove is an very expensive price to pay.
        ItemListener itemListener = new ItemListener() {
            @Override
            public void itemAdded(ItemEvent item) {
                totalAddedItemCount.incrementAndGet();
            }
View Full Code Here

    @Override
    public Object call() throws Exception {
        final ClientEndpoint endpoint = getEndpoint();
        final ClientEngine clientEngine = getClientEngine();

        ItemListener listener = new ItemListener() {
            @Override
            public void itemAdded(ItemEvent item) {
                send(item);
            }
View Full Code Here

    public void initialize() {
        final NodeEngine nodeEngine = getNodeEngine();
        CollectionConfig config = getConfig(nodeEngine);
        final List<ItemListenerConfig> itemListenerConfigs = config.getItemListenerConfigs();
        for (ItemListenerConfig itemListenerConfig : itemListenerConfigs) {
            ItemListener listener = itemListenerConfig.getImplementation();
            if (listener == null && itemListenerConfig.getClassName() != null) {
                try {
                    listener = ClassLoaderUtil.newInstance(nodeEngine.getConfigClassLoader(), itemListenerConfig.getClassName());
                } catch (Exception e) {
                    throw ExceptionUtil.rethrow(e);
View Full Code Here

    @Override
    public Object call() throws Exception {
        final ClientEndpoint endpoint = getEndpoint();
        final ClientEngine clientEngine = getClientEngine();

        ItemListener listener = new ItemListener() {
            @Override
            public void itemAdded(ItemEvent item) {
                send(item);
            }
View Full Code Here

    @Override
    public Object call() throws Exception {
        final ClientEndpoint endpoint = getEndpoint();
        final QueueService service = getService();

        ItemListener listener = new ItemListener() {
            @Override
            public void itemAdded(ItemEvent item) {
                send(item);
            }
View Full Code Here

TOP

Related Classes of com.hazelcast.core.ItemListener

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.