org.jgroups.util.Util.readObject()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(206)

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

Util.readObject介绍

暂无

代码示例

代码示例来源:origin: wildfly/wildfly

  1. @SuppressWarnings("unchecked")
  2. @Override
  3. public void readFrom(DataInput in) throws Exception {
  4. // We can't use Util.readObject since it's size is limited to 2^15-1
  5. // The runner could be larger than that possibly
  6. try {
  7. task = (Runnable)Util.readObject(in);
  8. }
  9. catch (IOException e) {
  10. throw e;
  11. }
  12. catch (Exception e) {
  13. throw new IOException("Exception encountered while reading execution runnable", e);
  14. }
  15. try {
  16. result = (T)Util.readObject(in);
  17. }
  18. catch (IOException e) {
  19. throw e;
  20. }
  21. catch (Exception e) {
  22. throw new IOException("Exception encountered while reading execution result", e);
  23. }
  24. }
  25. }

代码示例来源:origin: wildfly/wildfly

  1. @SuppressWarnings("unchecked")
  2. @Override
  3. public void readFrom(DataInput in) throws Exception {
  4. try {
  5. String classname=in.readUTF();
  6. _classCallable=ClassConfigurator.get(classname);
  7. }
  8. catch (ClassNotFoundException e) {
  9. throw new IOException("failed to read class from classname", e);
  10. }
  11. _constructorNumber = in.readByte();
  12. short numberOfArgs = in.readByte();
  13. _args = new Object[numberOfArgs];
  14. for (int i = 0; i < numberOfArgs; ++i) {
  15. try {
  16. _args[i] = Util.readObject(in);
  17. }
  18. catch (Exception e) {
  19. throw new IOException("failed to read arg", e);
  20. }
  21. }
  22. }

代码示例来源:origin: io.vertx/vertx-jgroups

  1. @Override
  2. public void readFrom(DataInput in) throws Exception {
  3. int size = in.readInt();
  4. T[] buffer = (T[]) new Object[size];
  5. for (int i = 0; i < size; i++) {
  6. buffer[i] = (T) Util.readObject(in);
  7. }
  8. values = new CopyOnWriteArrayList<>(buffer);
  9. }

代码示例来源:origin: org.jboss.eap/wildfly-client-all

  1. @SuppressWarnings("unchecked")
  2. @Override
  3. public void readFrom(DataInput in) throws Exception {
  4. // We can't use Util.readObject since it's size is limited to 2^15-1
  5. // The runner could be larger than that possibly
  6. try {
  7. task = (Runnable)Util.readObject(in);
  8. }
  9. catch (IOException e) {
  10. throw e;
  11. }
  12. catch (Exception e) {
  13. throw new IOException("Exception encountered while reading execution runnable", e);
  14. }
  15. try {
  16. result = (T)Util.readObject(in);
  17. }
  18. catch (IOException e) {
  19. throw e;
  20. }
  21. catch (Exception e) {
  22. throw new IOException("Exception encountered while reading execution result", e);
  23. }
  24. }
  25. }

代码示例来源:origin: org.jboss.eap/wildfly-client-all

  1. @SuppressWarnings("unchecked")
  2. @Override
  3. public void readFrom(DataInput in) throws Exception {
  4. try {
  5. String classname=in.readUTF();
  6. _classCallable=ClassConfigurator.get(classname);
  7. }
  8. catch (ClassNotFoundException e) {
  9. throw new IOException("failed to read class from classname", e);
  10. }
  11. _constructorNumber = in.readByte();
  12. short numberOfArgs = in.readByte();
  13. _args = new Object[numberOfArgs];
  14. for (int i = 0; i < numberOfArgs; ++i) {
  15. try {
  16. _args[i] = Util.readObject(in);
  17. }
  18. catch (Exception e) {
  19. throw new IOException("failed to read arg", e);
  20. }
  21. }
  22. }

代码示例来源:origin: org.jasig.portal/uPortal-utils-core

  1. @Override
  2. public void readFrom(DataInput in) throws Exception {
  3. if (log.isDebugEnabled()) {
  4. log.debug("HashedDaoAuthToken readFrom()");
  5. }
  6. this.authValue = (String) Util.readObject(in);
  7. }
  8. }

代码示例来源:origin: Jasig/uPortal

  1. @Override
  2. public void readFrom(DataInput in) throws Exception {
  3. if (log.isDebugEnabled()) {
  4. log.debug("HashedDaoAuthToken readFrom()");
  5. }
  6. this.authValue = (String) Util.readObject(in);
  7. }
  8. }

相关文章

Util类方法