com.hazelcast.core.MultiMap.clear()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(139)

本文整理了Java中com.hazelcast.core.MultiMap.clear()方法的一些代码示例,展示了MultiMap.clear()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultiMap.clear()方法的具体详情如下:
包路径:com.hazelcast.core.MultiMap
类名称:MultiMap
方法名:clear

MultiMap.clear介绍

[英]Clears the multimap. Removes all key-value pairs.
[中]清除多重映射。删除所有键值对。

代码示例

代码示例来源:origin: org.opendaylight.nic/intent-mapping-hazelcast

@Override
public void close() throws Exception {
  multiMap.clear();
  multiMap = null;
}

代码示例来源:origin: org.apache.camel/camel-hazelcast

private void clear(Exchange exchange) {
  this.cache.clear();
}

代码示例来源:origin: com.thinkaurelius.titan/titan-hazelcast

public void clearStore() throws StorageException {
  cache.clear();
}

代码示例来源:origin: hazelcast/hazelcast-jet

@ManagedAnnotation(value = "clear", operation = true)
public void clear() {
  managedObject.clear();
}

代码示例来源:origin: com.hazelcast/hazelcast-all

@ManagedAnnotation(value = "clear", operation = true)
public void clear() {
  managedObject.clear();
}

代码示例来源:origin: jclawson/hazeltask

public void clear() {
  if(guavaMultiMap != null)
    guavaMultiMap.clear();
  else
    hcMultiMap.clear();
}

代码示例来源:origin: org.opendaylight.nic/intent-mapping-hazelcast

@Override
  public boolean delete(String outerKey) {

    if(outerKey != null)
      return false;

    if (outerKey.isEmpty()) {
      return true;
    }

    if (getMultiMap().get(outerKey) != null) {
      getMultiMap().clear();
    }

    return true;
  }
}

代码示例来源:origin: FlavioF/quartz-scheduler-hazelcast-jobstore

@Override
public void clearAllSchedulingData()
 throws JobPersistenceException {
 jobsByKey.clear();
 triggersByKey.clear();
 jobsByGroup.clear();
 triggersByGroup.clear();
 calendarsByName.clear();
 pausedTriggerGroups.clear();
 pausedJobGroups.clear();
}

代码示例来源:origin: hazelcast/hazelcast-jet

protected void handleClear(String[] args) {
  String iteratorStr = args[0];
  if (iteratorStr.startsWith("s.")) {
    getSet().clear();
  } else if (iteratorStr.startsWith("m.")) {
    getMap().clear();
  } else if (iteratorStr.startsWith("mm.")) {
    getMultiMap().clear();
  } else if (iteratorStr.startsWith("q.")) {
    getQueue().clear();
  } else if (iteratorStr.startsWith("l.")) {
    getList().clear();
  }
  println("Cleared all.");
}

代码示例来源:origin: hazelcast/hazelcast-jet

protected void handleClear(String[] args) {
  String iteratorStr = args[0];
  if (iteratorStr.startsWith("s.")) {
    getSet().clear();
  } else if (iteratorStr.startsWith("m.")) {
    getMap().clear();
  } else if (iteratorStr.startsWith("mm.")) {
    getMultiMap().clear();
  } else if (iteratorStr.startsWith("q.")) {
    getQueue().clear();
  } else if (iteratorStr.startsWith("l.")) {
    getList().clear();
  }
  println("Cleared all.");
}

代码示例来源:origin: com.hazelcast/hazelcast-all

protected void handleClear(String[] args) {
  String iteratorStr = args[0];
  if (iteratorStr.startsWith("s.")) {
    getSet().clear();
  } else if (iteratorStr.startsWith("m.")) {
    getMap().clear();
  } else if (iteratorStr.startsWith("mm.")) {
    getMultiMap().clear();
  } else if (iteratorStr.startsWith("q.")) {
    getQueue().clear();
  } else if (iteratorStr.startsWith("l.")) {
    getList().clear();
  }
  println("Cleared all.");
}

代码示例来源:origin: com.hazelcast/hazelcast-all

protected void handleClear(String[] args) {
  String iteratorStr = args[0];
  if (iteratorStr.startsWith("s.")) {
    getSet().clear();
  } else if (iteratorStr.startsWith("m.")) {
    getMap().clear();
  } else if (iteratorStr.startsWith("mm.")) {
    getMultiMap().clear();
  } else if (iteratorStr.startsWith("q.")) {
    getQueue().clear();
  } else if (iteratorStr.startsWith("l.")) {
    getList().clear();
  }
  println("Cleared all.");
}

代码示例来源:origin: spring-projects/spring-integration-extensions

@Before
public void setUp() {
  this.distributedMap.clear();
  this.distributedBulkMap.clear();
  this.distributedList.clear();
  this.distributedBulkList.clear();
  this.distributedSet.clear();
  this.distributedBulkSet.clear();
  this.distributedQueue.clear();
  this.distributedBulkQueue.clear();
  this.multiMap.clear();
  this.replicatedMap.clear();
  this.bulkReplicatedMap.clear();
}

代码示例来源:origin: spring-projects/spring-integration-extensions

public static void testEventDrivenForMultiMapEntryEvents(
    final MultiMap<Integer, HazelcastIntegrationTestUser> multiMap,
    final PollableChannel channel, final String cacheName) {
  multiMap.put(1, new HazelcastIntegrationTestUser(1, "TestName1", "TestSurname1"));
  Message<?> msg = channel.receive(TIMEOUT);
  verifyEntryEvent(msg, cacheName, EntryEventType.ADDED);
  multiMap.put(1,
      new HazelcastIntegrationTestUser(1, "TestName1", "TestSurnameUpdated"));
  msg = channel.receive(TIMEOUT);
  verifyEntryEvent(msg, cacheName, EntryEventType.ADDED);
  multiMap.remove(1);
  msg = channel.receive(TIMEOUT);
  verifyEntryEvent(msg, cacheName, EntryEventType.REMOVED);
  msg = channel.receive(TIMEOUT);
  verifyEntryEvent(msg, cacheName, EntryEventType.REMOVED);
  multiMap.put(2, new HazelcastIntegrationTestUser(2, "TestName2", "TestSurname2"));
  msg = channel.receive(TIMEOUT);
  verifyEntryEvent(msg, cacheName, EntryEventType.ADDED);
  multiMap.clear();
  msg = channel.receive(TIMEOUT);
  verifyEntryEvent(msg, cacheName, EntryEventType.CLEAR_ALL);
}

相关文章