本文整理汇总了Java中org.apache.hadoop.nfs.nfs3.Nfs3Status.NFS3_OK属性的典型用法代码示例。如果您正苦于以下问题:Java Nfs3Status.NFS3_OK属性的具体用法?Java Nfs3Status.NFS3_OK怎么用?Java Nfs3Status.NFS3_OK使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.hadoop.nfs.nfs3.Nfs3Status
的用法示例。
在下文中一共展示了Nfs3Status.NFS3_OK属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: serialize
@Override
public XDR serialize(XDR out, int xid, Verifier verifier) {
super.serialize(out, xid, verifier);
if (getStatus() == Nfs3Status.NFS3_OK) {
out.writeBoolean(true); // Handle follows
objHandle.serialize(out);
out.writeBoolean(true); // Attributes follow
postOpObjAttr.serialize(out);
}
if (dirWcc == null) {
dirWcc = new WccData(null, null);
}
dirWcc.serialize(out);
return out;
}
示例2: deserialize
public static PATHCONF3Response deserialize(XDR xdr) {
int status = xdr.readInt();
xdr.readBoolean();
Nfs3FileAttributes objPostOpAttr = Nfs3FileAttributes.deserialize(xdr);
int linkMax = 0;
int nameMax = 0;
boolean noTrunc = false;
boolean chownRestricted = false;
boolean caseInsensitive = false;
boolean casePreserving = false;
if (status == Nfs3Status.NFS3_OK) {
linkMax = xdr.readInt();
nameMax = xdr.readInt();
noTrunc = xdr.readBoolean();
chownRestricted = xdr.readBoolean();
caseInsensitive = xdr.readBoolean();
casePreserving = xdr.readBoolean();
}
return new PATHCONF3Response(status, objPostOpAttr, linkMax, nameMax,
noTrunc, chownRestricted, caseInsensitive, casePreserving);
}
示例3: serialize
@Override
public XDR serialize(XDR xdr, int xid, Verifier verifier) {
super.serialize(xdr, xid, verifier);
xdr.writeBoolean(true); // Attributes follow
postOpDirAttr.serialize(xdr);
if (getStatus() == Nfs3Status.NFS3_OK) {
xdr.writeLongAsHyper(cookieVerf);
for (Entry3 e : dirList.entries) {
xdr.writeBoolean(true); // Value follows
e.seralize(xdr);
}
xdr.writeBoolean(false);
xdr.writeBoolean(dirList.eof);
}
return xdr;
}
示例4: deserialize
public static FSSTAT3Response deserialize(XDR xdr) {
int status = xdr.readInt();
xdr.readBoolean();
Nfs3FileAttributes postOpAttr = Nfs3FileAttributes.deserialize(xdr);
long tbytes = 0;
long fbytes = 0;
long abytes = 0;
long tfiles = 0;
long ffiles = 0;
long afiles = 0;
int invarsec = 0;
if (status == Nfs3Status.NFS3_OK) {
tbytes = xdr.readHyper();
fbytes = xdr.readHyper();
abytes = xdr.readHyper();
tfiles = xdr.readHyper();
ffiles = xdr.readHyper();
afiles = xdr.readHyper();
invarsec = xdr.readInt();
}
return new FSSTAT3Response(status, postOpAttr, tbytes, fbytes, abytes,
tfiles, ffiles, afiles, invarsec);
}
示例5: deserialize
public static READDIRPLUS3Response deserialize(XDR xdr) {
int status = xdr.readInt();
xdr.readBoolean();
Nfs3FileAttributes postOpDirAttr = Nfs3FileAttributes.deserialize(xdr);
long cookieVerf = 0;
ArrayList<EntryPlus3> entries = new ArrayList<EntryPlus3>();
DirListPlus3 dirList = null;
if (status == Nfs3Status.NFS3_OK) {
cookieVerf = xdr.readHyper();
while (xdr.readBoolean()) {
EntryPlus3 e = EntryPlus3.deseralize(xdr);
entries.add(e);
}
boolean eof = xdr.readBoolean();
EntryPlus3[] allEntries = new EntryPlus3[entries.size()];
entries.toArray(allEntries);
dirList = new DirListPlus3(allEntries, eof);
}
return new READDIRPLUS3Response(status, postOpDirAttr, cookieVerf, dirList);
}
示例6: serialize
@Override
public XDR serialize(XDR out, int xid, Verifier verifier) {
super.serialize(out, xid, verifier);
out.writeBoolean(true);
postOpAttr.serialize(out);
if (getStatus() == Nfs3Status.NFS3_OK) {
out.writeInt(rtmax);
out.writeInt(rtpref);
out.writeInt(rtmult);
out.writeInt(wtmax);
out.writeInt(wtpref);
out.writeInt(wtmult);
out.writeInt(dtpref);
out.writeLongAsHyper(maxFileSize);
timeDelta.serialize(out);
out.writeInt(properties);
}
return out;
}
示例7: deserialize
public static READDIR3Response deserialize(XDR xdr) {
int status = xdr.readInt();
xdr.readBoolean();
Nfs3FileAttributes postOpDirAttr = Nfs3FileAttributes.deserialize(xdr);
long cookieVerf = 0;
ArrayList<Entry3> entries = new ArrayList<Entry3>();
DirList3 dirList = null;
if (status == Nfs3Status.NFS3_OK) {
cookieVerf = xdr.readHyper();
while (xdr.readBoolean()) {
Entry3 e = Entry3.deserialzie(xdr);
entries.add(e);
}
boolean eof = xdr.readBoolean();
Entry3[] allEntries = new Entry3[entries.size()];
entries.toArray(allEntries);
dirList = new DirList3(allEntries, eof);
}
return new READDIR3Response(status, postOpDirAttr, cookieVerf, dirList);
}
示例8: deserialize
public static WRITE3Response deserialize(XDR xdr) {
int status = xdr.readInt();
WccData fileWcc = WccData.deserialize(xdr);
int count = 0;
WriteStableHow stableHow = null;
long verifier = 0;
if (status == Nfs3Status.NFS3_OK) {
count = xdr.readInt();
int how = xdr.readInt();
stableHow = WriteStableHow.values()[how];
verifier = xdr.readHyper();
}
return new WRITE3Response(status, fileWcc, count, stableHow, verifier);
}
示例9: serialize
@Override
public XDR serialize(XDR out, int xid, Verifier verifier) {
super.serialize(out, xid, verifier);
out.writeBoolean(true); // Attribute follows
postOpAttr.serialize(out);
if (getStatus() == Nfs3Status.NFS3_OK) {
out.writeInt(count);
out.writeBoolean(eof);
out.writeInt(count);
out.writeFixedOpaque(data.array(), count);
}
return out;
}
示例10: deserialize
public static ACCESS3Response deserialize(XDR xdr) {
int status = xdr.readInt();
Nfs3FileAttributes postOpAttr = null;
int access = 0;
if (status == Nfs3Status.NFS3_OK) {
postOpAttr = Nfs3FileAttributes.deserialize(xdr);
access = xdr.readInt();
}
return new ACCESS3Response(status, postOpAttr, access);
}
示例11: messageReceived
@Override
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {
// Get handle from create response
ChannelBuffer buf = (ChannelBuffer) e.getMessage();
XDR rsp = new XDR(buf.array());
if (rsp.getBytes().length == 0) {
LOG.info("rsp length is zero, why?");
return;
}
LOG.info("rsp length=" + rsp.getBytes().length);
RpcReply reply = RpcReply.read(rsp);
int xid = reply.getXid();
// Only process the create response
if (xid != 0x8000004c) {
return;
}
int status = rsp.readInt();
if (status != Nfs3Status.NFS3_OK) {
LOG.error("Create failed, status =" + status);
return;
}
LOG.info("Create succeeded");
rsp.readBoolean(); // value follow
handle = new FileHandle();
handle.deserialize(rsp);
channel = e.getChannel();
}
示例12: deserialize
public static CREATE3Response deserialize(XDR xdr) {
int status = xdr.readInt();
FileHandle objHandle = new FileHandle();
Nfs3FileAttributes postOpObjAttr = null;
if (status == Nfs3Status.NFS3_OK) {
xdr.readBoolean();
objHandle.deserialize(xdr);
xdr.readBoolean();
postOpObjAttr = Nfs3FileAttributes.deserialize(xdr);
}
WccData dirWcc = WccData.deserialize(xdr);
return new CREATE3Response(status, objHandle, postOpObjAttr, dirWcc);
}
示例13: deserialize
public static MKDIR3Response deserialize(XDR xdr) {
int status = xdr.readInt();
FileHandle objFileHandle = new FileHandle();
Nfs3FileAttributes objAttr = null;
WccData dirWcc;
if (status == Nfs3Status.NFS3_OK) {
xdr.readBoolean();
objFileHandle.deserialize(xdr);
xdr.readBoolean();
objAttr = Nfs3FileAttributes.deserialize(xdr);
}
dirWcc = WccData.deserialize(xdr);
return new MKDIR3Response(status, objFileHandle, objAttr, dirWcc);
}
示例14: serialize
@Override
public XDR serialize(XDR out, int xid, Verifier verifier) {
super.serialize(out, xid, verifier);
if (getStatus() == Nfs3Status.NFS3_OK) {
out.writeBoolean(true); // Handle follows
objFileHandle.serialize(out);
out.writeBoolean(true); // Attributes follow
objAttr.serialize(out);
}
dirWcc.serialize(out);
return out;
}
示例15: serialize
@Override
public XDR serialize(XDR out, int xid, Verifier verifier) {
super.serialize(out, xid, verifier);
if (this.getStatus() == Nfs3Status.NFS3_OK) {
out.writeBoolean(true);
objFileHandle.serialize(out);
out.writeBoolean(true);
objPostOpAttr.serialize(out);
}
dirWcc.serialize(out);
return out;
}