intra-mart(R)
5.0

jp.co.intra_mart.foundation.service.client.information
クラス ExternalDirectory

java.lang.Object
  拡張jp.co.intra_mart.foundation.service.client.NetworkConnector
      拡張jp.co.intra_mart.foundation.service.client.NetworkAgent
          拡張jp.co.intra_mart.foundation.service.client.information.ExternalDirectory
すべての実装インタフェース:
ActionListener, Serializable, TreasureDirectory

public class ExternalDirectory
extends NetworkAgent
implements Serializable, TreasureDirectory

共有データグループを管理するオブジェクトです。

グループ化された共有データのグループに関する情報を操作します。 各グループに保存されているデータの取得や各グループへのデータの保存には、 ExternalMemory クラスを利用します。
このオブジェクトにより扱うデータは、Shared Memory Service で一元管理されます。 そのため、intra-mart の各サーバモジュールを分散は位置している場合、 このオブジェクトの各メソッド実行時は、Shared Memory Service と通信を行います。

このオブジェクトで保管されるデータは、Shared Memory Service のメモリ中で 管理され、Shared Memory Service が動作している間、その存在が保証されます。

導入されたバージョン:
version 3.1
関連項目:
ExternalMemory, 直列化された形式

フィールドの概要
 
クラス jp.co.intra_mart.foundation.service.client.NetworkAgent から継承したフィールド
NULL_DATA
 
クラス jp.co.intra_mart.foundation.service.client.NetworkConnector から継承したフィールド
GET, GET_ENTIRETY, GET_ENTIRETY_KEY, GET_ITEM, GET_ITEM_KEY, GET_SUBSET, MOVE, MOVE_ENTIRETY, MOVE_ITEM, REMOVE, REMOVE_ENTIRETY, REMOVE_ITEM, SET, SET_ENTIRETY, SET_ITEM
 
コンストラクタの概要
protected ExternalDirectory(String dir)
          共有データを扱うための新しいオブジェクトを構築します。
 
メソッドの概要
 Object action(Object argV)
          推奨されていません。  
protected  SocketConnection connection()
          サーバに接続するためのコネクションを取得します。
 Map destroy(String id)
          グループデータを削除します。
 List entries()
          このオブジェクトの表す dir に属するグループID一覧を取得します。
 TreasureFile entry(String id)
          空のグループを作成します。
 TreasureFile getFile(String id)
          このオブジェクトの表すディレクトリにキー id でマップされた ExternalMemory インスタンスを取得します。
static ExternalDirectory getInstance(String dir)
          共有データを扱うためのオブジェクトを取得します。
 String getName()
          このオブジェクトの表すディレクトリ名称を取得します。
 
クラス jp.co.intra_mart.foundation.service.client.NetworkAgent から継承したメソッド
execute
 
クラス jp.co.intra_mart.foundation.service.client.NetworkConnector から継承したメソッド
close, execute, freeMemory, isConnected, serverTime, totalMemory
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ExternalDirectory

protected ExternalDirectory(String dir)
共有データを扱うための新しいオブジェクトを構築します。

このインスタンスは、dir に保存されている共有データ に関する情報を扱えます。

メソッドの詳細

getInstance

public static ExternalDirectory getInstance(String dir)
共有データを扱うためのオブジェクトを取得します。

このインスタンスは、dir に保存されている共有データ に関する情報を扱えます。

パラメータ:
dir - 保存ディレクトリ
例外:
NullPointerException - 引数が null

connection

protected SocketConnection connection()
                               throws IOException
サーバに接続するためのコネクションを取得します。

定義:
クラス NetworkConnector 内の connection
戻り値:
コネクション
例外:
IOException - 入出力エラーが発生した場合

getName

public String getName()
このオブジェクトの表すディレクトリ名称を取得します。

定義:
インタフェース TreasureDirectory 内の getName
戻り値:
このオブジェクトの表すディレクトリ名称

getFile

public TreasureFile getFile(String id)
このオブジェクトの表すディレクトリにキー id でマップされた ExternalMemory インスタンスを取得します。

定義:
インタフェース TreasureDirectory 内の getFile
戻り値:
ExternalMemory インスタンス

entries

public List entries()
             throws IOException,
                    ClassNotFoundException
このオブジェクトの表す dir に属するグループID一覧を取得します。

コレクションの各要素は String です。

定義:
インタフェース TreasureDirectory 内の entries
戻り値:
グループIDのリスト
例外:
IOException - 入出力エラー
ClassNotFoundException - データ復元時のエラー

entry

public TreasureFile entry(String id)
                   throws IOException
空のグループを作成します。

すでにグループが存在していた場合、このメソッドは何もしません。
このメソッドで作成されたグループにはデータが存在しません。
グループを作成する事により、entries() で取得できるグループリストに このオブジェクトが表すグループが含まれます。
返却値としてグループ id のデータを扱うためのオブジェクトを返します。

定義:
インタフェース TreasureDirectory 内の entry
パラメータ:
id - グループ
戻り値:
TreasureFile インスタンス
例外:
NullPointerException - 引数が null
IOException - 入出力エラー
関連項目:
entries()

destroy

public Map destroy(String id)
            throws IOException,
                   ClassNotFoundException
グループデータを削除します。

id に属する共有データをすべて削除し、 共有データ領域から id に属するデータを保管する領域も削除します。 このメソッドが実行されると entries() で取得できるグループリストに このオブジェクトが示すグループが含まれなくなります。

返却値は、id に属していたデータ一覧になります。返却データに関して、 データを保存した時の環境とデータに関連するクラスの構造が異なる場合 例外がスローされます。

定義:
インタフェース TreasureDirectory 内の destroy
戻り値:
id に属するデータ一覧
例外:
IOException - 入出力エラー
ClassNotFoundException - データ復元時のエラー
OptionalDataException - データ復元時のエラー

action

public Object action(Object argV)
推奨されていません。  

処理ロジック。

定義:
インタフェース ActionListener 内の action
定義:
クラス NetworkAgent 内の action
パラメータ:
argV - 引数
戻り値:
実行結果
関連項目:
NetworkAgent.action(Object), NetworkAgent.execute(Object)

intra-mart(R)
5.0

Copyright © 2000-2005 NTT DATA INTRAMART CO.,LTD. All Rights Reserved.